yera.config.schema.providers
Provider config — one entry per provider type, each holding named connections.
Symbols
AnthropicConnection
BaseConnectionConnection config for the Anthropic API.
No connection config beyond credentials — the endpoint is fixed.
Attributes
Names of secrets required by this connection.
AnthropicProviderConfig
BaseProviderConfigProvider config for the Anthropic API.
Attributes
Named connection configs, each declaring credential names.
AWSConnection
BaseConnectionConnection config for AWS Bedrock.
Attributes
AWS region to connect to, e.g. "eu-west-1".
Underlying AWS named profile from ~/.aws/config.
If None, the default AWS profile is used.
Names of secrets required by this connection.
AWSProviderConfig
BaseProviderConfigProvider config for AWS Bedrock.
Attributes
Named connection configs, each declaring a region, optional AWS profile name, and credential names.
AzureConnection
BaseConnectionConnection config for Azure OpenAI.
Attributes
Azure OpenAI endpoint URL.
Azure OpenAI API version string, e.g. "2024-02-01".
Names of secrets required by this connection.
AzureProviderConfig
BaseProviderConfigProvider config for Azure OpenAI.
Attributes
Named connection configs, each declaring an endpoint, API version, and credential names.
BaseConnection
BaseModelAnthropicConnection, AWSConnection, AzureConnection, GeminiConnection, LlamaCppConnection, MistralConnection, OllamaConnection, OpenAIConnection, OpenRouterConnectionBase 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>.
Attributes
Names of secrets required by this connection.
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.
Attributes
Named connection configs for this provider.
GeminiConnection
BaseConnectionConnection config for the Gemini Developer API.
Attributes
Environment variable containing the Gemini API key.
GeminiProviderConfig
BaseProviderConfigProvider config for the Gemini Developer API.
Attributes
Named Gemini connection configurations.
LlamaCppConnection
BaseConnectionConnection config for llama-cpp direct library mode.
Attributes
Filesystem paths to directories containing local GGUF model files.
LlamaCppProviderConfig
BaseProviderConfigProvider config for llama-cpp direct library mode.
Attributes
Named connection configs, each declaring one or more local model directory paths.
MistralConnection
BaseConnectionConnection config for the Mistral API.
No connection config beyond credentials — the endpoint is fixed.
Attributes
Names of secrets required by this connection.
MistralProviderConfig
BaseProviderConfigProvider config for the Mistral API.
Attributes
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.
Attributes
URL of the Ollama instance.
Names of secrets required by this connection.
OllamaProviderConfig
BaseProviderConfigProvider config for Ollama.
Supports both local and remote instances via per-connection base_url.
Attributes
Named connection configs, each declaring a base URL and optional credential names.
OpenAIConnection
BaseConnectionConnection config for the OpenAI API.
No connection config beyond credentials — the endpoint is fixed.
Attributes
Names of secrets required by this connection.
OpenAIProviderConfig
BaseProviderConfigProvider config for the OpenAI API.
Attributes
Named connection configs, each declaring credential names.
OpenRouterConnection
BaseConnectionConnection config for the OpenRouter API.
Attributes
Environment variable containing the OpenRouter API key.
Optional application URL used for OpenRouter attribution.
Optional application name used for OpenRouter attribution.
OpenRouterProviderConfig
BaseProviderConfigProvider config for the OpenRouter API.
Attributes
Named OpenRouter connection configurations.
Providers
BaseModelTop-level provider config loaded from yera.toml.
Each field is optional — only configured providers are present.
Attributes
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.
Returns
the connection config object representing the connection.