Skip to main content

Module config

Module config 

Source
Expand description

Host-supplied configuration and provider-scoped credentials. No file access.

Structs§

ModelDefinition
One model under a provider. id is required (mirrors TS ModelDefinition).
ModelsConfig
The models.json document. Mirrors TS { providers: Record<id, ProviderConfig> } (core/model-config.ts ModelsConfigSchema).
ProviderConfig
A provider entry in models.json. The fields mirror the TS ProviderConfig for protocol, endpoint, headers, credentials and model metadata.

Enums§

ConfigError
Credential
A stored credential. Mirrors the TS Credential union (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_url when a models.json provider omits it. Kept here (not imported from rpi_ai) so the config layer never depends on the provider’s private models module. Public so crate::RuntimeConfig::resolve can tell a gateway model (whose base_url differs 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 owned String for the unwrap_or_else ergonomic used by provider_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§

AuthStore
The auth store: providerId -> Credential. Mirrors upstream Record<providerId, Credential>.