yera.config.schema.providers
Provider config — one entry per provider type, each holding named connections.
Symbols
AnthropicConnection
APIKeyConnectionConnection config for the Anthropic API.
Fields
Whether the API key is referenced through the environment or Yera's protected secret store.
Environment-variable name or opaque stored-secret identifier.
AnthropicProviderConfig
BaseProviderConfigProvider config for the Anthropic API.
Fields
Named connection configs, each declaring credential names.
APIKeyConnection
BaseConnectionAnthropicConnection, GeminiConnection, MistralConnection, OpenAIConnection, OpenRouterConnectionBase configuration for providers authenticated by an API key.
Fields
Whether the API key is referenced through the environment or Yera's protected secret store.
Environment-variable name or opaque stored-secret identifier.
AWSConnection
BaseConnectionConnection config for AWS Bedrock.
Fields
AWS region used by this connection.
Named profile from the local AWS configuration.
AWSProviderConfig
BaseProviderConfigProvider config for AWS Bedrock.
Fields
Named connection configs, each declaring a region, optional AWS profile name, and credential names.
AzureConnection
BaseConnectionConnection config for Azure OpenAI.
Fields
Name of the Azure OpenAI resource.
Azure resource group containing the OpenAI resource.
Azure subscription containing the OpenAI resource.
URL of the Azure OpenAI endpoint.
Azure tenant used to authenticate this connection.
AzureProviderConfig
BaseProviderConfigProvider config for Azure OpenAI.
Fields
Named connection configs, each declaring an endpoint, API version, and credential names.
BaseConnection
BaseModelBase class for all provider connections.
credentials declares the names of secrets this connection requires.
The retrieval method resolves each name from the keyring using the path
providers.<provider_type>.<connection_name>.<credential_name>.
Fields
BaseProviderConfig
BaseModel, Generic[TConnection]AnthropicProviderConfig, AWSProviderConfig, AzureProviderConfig, GeminiProviderConfig, LlamaCppProviderConfig, MistralProviderConfig, OllamaProviderConfig, OpenAIProviderConfig, OpenRouterProviderConfigCommon structure for all provider configs.
Each provider holds a named collection of connections. The active connection is always determined by the active Yera profile's provider map — never by the provider itself.
Fields
Named connection configs for this provider.
GeminiConnection
APIKeyConnectionConnection config for the Gemini Developer API.
Fields
Whether the API key is referenced through the environment or Yera's protected secret store.
Environment-variable name or opaque stored-secret identifier.
GeminiProviderConfig
BaseProviderConfigProvider config for the Gemini Developer API.
Fields
Named Gemini connection configurations.
LlamaCppConnection
BaseConnectionConnection config for llama-cpp direct library mode.
Fields
Directories searched for local GGUF model files.
LlamaCppProviderConfig
BaseProviderConfigProvider config for llama-cpp direct library mode.
Fields
Named connection configs, each declaring one or more local model directory paths.
MistralConnection
APIKeyConnectionConnection config for the Mistral API.
Fields
Whether the API key is referenced through the environment or Yera's protected secret store.
Environment-variable name or opaque stored-secret identifier.
MistralProviderConfig
BaseProviderConfigProvider config for the Mistral API.
Fields
Named connection configs, each declaring credential names.
OllamaConnection
BaseConnectionConnection config for an Ollama instance.
Supports both local and remote instances via base_url.
Credentials are optional — only needed for secured remote instances.
Fields
Address of the Ollama service.
OllamaProviderConfig
BaseProviderConfigProvider config for Ollama.
Supports both local and remote instances via per-connection base_url.
Fields
Named connection configs, each declaring a base URL and optional credential names.
OpenAIConnection
APIKeyConnectionConnection config for the OpenAI API.
Fields
Whether the API key is referenced through the environment or Yera's protected secret store.
Environment-variable name or opaque stored-secret identifier.
OpenAIProviderConfig
BaseProviderConfigProvider config for the OpenAI API.
Fields
Named connection configs, each declaring credential names.
OpenRouterConnection
APIKeyConnectionConnection config for the OpenRouter API.
Fields
Whether the API key is referenced through the environment or Yera's protected secret store.
Environment-variable name or opaque stored-secret identifier.
Optional application URL sent for OpenRouter attribution.
Optional application name sent for OpenRouter attribution.
OpenRouterProviderConfig
BaseProviderConfigProvider config for the OpenRouter API.
Fields
Named OpenRouter connection configurations.
Providers
BaseModelTop-level provider config loaded from yera.toml.
Each field is optional — only configured providers are present.
Fields
Anthropic API provider config.
OpenAI API provider config.
Mistral API provider config.
AWS Bedrock provider config.
Azure OpenAI provider config.
Ollama provider config.
llama-cpp direct library mode provider config.
OpenRouter API provider config.
Gemini Developer API provider config.
Methods
Providers.connection_for_model
connection_for_model(
model: BaseModelConfig,
) → BaseConnectionGet the provider connection used by a given model.
The connection object represents all the data needed to call the provider and use the given model.
Parameters
Model whose configured provider connection should be resolved.
Returns
The connection configuration used by the model.
Raises
If the model's provider or named connection is not configured.