Expand description
Host-supplied configuration and provider-scoped credentials. No file access.
Structs§
- Model
Definition - One model under a provider.
idis required (mirrors TSModelDefinition). - Models
Config - The
models.jsondocument. Mirrors TS{ providers: Record<id, ProviderConfig> }(core/model-config.tsModelsConfigSchema). - Provider
Config - A provider entry in
models.json. The fields mirror the TSProviderConfigfor protocol, endpoint, headers, credentials and model metadata.
Enums§
- Config
Error - Credential
- A stored credential. Mirrors the TS
Credentialunion (packages/ai/src/auth/types.ts). OAuth credentials are provider-scoped and must never be logged or exposed to the agent transcript.
Constants§
- ANTHROPIC_
DEFAULT_ BASE_ URL - The first-party Anthropic endpoint — used as the fallback
base_urlwhen a models.json provider omits it. Kept here (not imported fromrpi_ai) so the config layer never depends on the provider’s privatemodelsmodule. Public socrate::RuntimeConfig::resolvecan tell a gateway model (whosebase_urldiffers from this) from a built-in Anthropic model. - DEFAULT_
PROVIDER_ ID
Functions§
- default_
anthropic_ base_ url - Same value as
ANTHROPIC_DEFAULT_BASE_URL, as an ownedStringfor theunwrap_or_elseergonomic used byprovider_to_models. - model_
compat_ warnings - provider_
is_ anthropic_ compatible - provider_
is_ openai_ completions - Whether a configured provider uses the OpenAI Chat Completions protocol.
- provider_
is_ openai_ responses - provider_
to_ models
Type Aliases§
- Auth
Store - The auth store:
providerId -> Credential. Mirrors upstreamRecord<providerId, Credential>.