← Về thư mục
openai4s/server/model_profiles.py
- ProfileCredential · class · L90-L102 — class ProfileCredential
- usable · method · L101-L102 — def usable(self) -> bool
- ModelProfileError · class · L105-L108 — class ModelProfileError(ValueError)
- init · method · L106-L108 — def init(self, message: str, status_code: int = 400) -> None
- clean_api_key · function · L111-L114 — def clean_api_key(value: Any) -> str
- resolve_profile_key · function · L117-L137 — def resolve_profile_key(store: Any, profile: Mapping[str, Any]) -> str
- _probe_detail · function · L140-L202 — def _probe_detail(error: Exception, public: dict) -> str
- ModelProfileService · class · L205-L1188 — class ModelProfileService
- init · method · L208-L225 — def init( self, store: Any, cfg: Config, *, providers: Callable[[], Mapping[str, Mapping[str, Any]]], presets: Callable[[], Sequence[ModelPreset]] = model_presets, id_factory: Callable[[], str] | None = None, clock_ms: Callable[[], int] | None = None, receipts: Any | None = None, ) -> None
- effective_model_id · method · L227-L233 — def effective_model_id(self, provider: Any, model: Any) -> str
- resolve_key · method · L238-L240 — def resolve_key(self, profile: Mapping[str, Any]) -> str
- credential · method · L242-L311 — def credential( self, profile: Mapping[str, Any], configuration: Mapping[str, Any] | None = None, ) -> ProfileCredential
- _credential_scope · method · L313-L341 — def _credential_scope(self, configuration: Mapping[str, Any]) -> tuple[str, str]
- _provider_key · method · L343-L359 — def _provider_key(self, provider: str) -> str
- _injected_llm_key · method · L361-L374 — def _injected_llm_key(self) -> str
- _keyless_endpoint · method · L377-L387 — def _keyless_endpoint(provider: str, model: str, base_url: str) -> bool
- _store_key · method · L389-L398 — def _store_key(self, profile_id: str, key: str) -> str
- _forget_key · method · L400-L406 — def _forget_key(self, profile: Mapping[str, Any]) -> None
- _receipts · method · L408-L411 — def _receipts(self) -> Any | None
- _receipt_identity · method · L413-L437 — def _receipt_identity(self, profile: Mapping[str, Any]) -> dict[str, Any]
- _public_receipt · method · L439-L457 — def _public_receipt(self, profile: Mapping[str, Any]) -> dict[str, Any] | None
- _persist_receipt · method · L459-L485 — def _persist_receipt( self, profile: Mapping[str, Any], *, reachable: bool, native_tool_call: str, streaming: str, ) -> dict[str, Any] | None
- probe · method · L487-L669 — def probe(self, profile_id: str) -> dict[str, Any]
- _request · function · L548-L560 — def _request(**kwargs: Any) -> dict[str, Any]
- _on_delta · function · L612-L613 — def _on_delta(text: Any) -> None
- readiness · method · L671-L737 — def readiness(self, profile: Mapping[str, Any]) -> dict[str, Any]
- public_profile · method · L739-L768 — def public_profile(self, profile: Mapping[str, Any]) -> dict[str, Any]
- models_payload · method · L770-L828 — def models_payload(self, default_model_id: str) -> dict[str, Any]
- add · function · L782-L794 — def add(entry_id: Any, name: Any, description: Any, **extra: Any) -> None
- profiles_payload · method · L830-L879 — def profiles_payload(self) -> tuple[dict[str, Any], str | None]
- remove_seeded · function · L845-L857 — def remove_seeded(profiles: list[dict[str, Any]]) -> None
- _configuration · method · L897-L898 — def _configuration(cls, profile: Mapping[str, Any]) -> tuple[str, ...]
- _seal_revision · method · L901-L938 — def _seal_revision(cls, profile: dict[str, Any], *, now_ms: int) -> int
- revision_config · method · L941-L954 — def revision_config( cls, profile: Mapping[str, Any], revision: int ) -> dict[str, Any] | None
- _protocol · method · L957-L963 — def _protocol(value: Any) -> str
- create · method · L965-L986 — def create(self, body: Mapping[str, Any]) -> dict[str, Any]
- activate · method · L988-L1028 — def activate(self, profile_id: str) -> tuple[dict[str, Any], str]
- to_front · function · L1016-L1022 — def to_front(profiles: list[dict[str, Any]]) -> None
- edit · method · L1030-L1095 — def edit( self, profile_id: str, body: Mapping[str, Any] ) -> tuple[dict[str, Any], str | None]
- mutate · function · L1035-L1076 — def mutate(profiles: list[dict[str, Any]]) -> dict[str, Any] | None
- delete · method · L1097-L1138 — def delete(self, profile_id: str) -> None
- mark · function · L1120-L1128 — def mark(profiles: list[dict[str, Any]]) -> None
- migrate_profile_keys · method · L1140-L1188 — def migrate_profile_keys(self) -> dict
- convert · function · L1151-L1181 — def convert(profiles: list[dict[str, Any]]) -> None
- migrate_provider_alias · function · L1191-L1227 — def migrate_provider_alias( store: Any, providers: Mapping[str, Mapping[str, Any]], *, old: str, new: str, ) -> None
- migrate · function · L1210-L1225 — def migrate(profiles: list[dict[str, Any]]) -> None