Skip to main content

Provider Config Reference

This page is the compact field reference for model providers. For provider setup, profile ids, aliases, custom endpoints, and operational checks, see Provider Integrations. For the model workflow, including fallback routing, see Configuring Models.

Anyy reads provider settings from config.yaml, validates unknown YAML fields strictly, then normalizes the shorthand and structured model settings into one runtime view.

Minimal Shape

providers:
- id: openrouter
profile: openrouter
credential_ref: env:OPENROUTER_API_KEY
default_model: anthropic/claude-sonnet-4

default_model: openrouter/anthropic/claude-sonnet-4
main_model:
provider_id: openrouter
model: anthropic/claude-sonnet-4

default_model is the provider/model shorthand. main_model is the structured form. You can write either one by hand; Anyy fills the missing form during config load when both parts are present.

Main Model Fields

FieldTypeMeaning
default_modelstringShorthand in provider_id/model_id form. If providers are configured, the provider id must exist.
main_model.provider_idstringProvider id used for ordinary chat and tool turns.
main_model.modelstringModel id passed to that provider.

If both forms are present, keep them consistent. The setup wizard writes both so commands, dashboard surfaces, and older config readers see the same main model.

Provider Entries

Each item under providers defines one backend connection.

FieldTypeMeaning
idstringRequired unique provider id. It is also the prefix used in default_model.
profilestringOptional built-in profile. When omitted, Anyy can infer a profile from a known provider id.
api_modestringWire protocol. Required when no profile supplies it.
auth_modestringAuthentication mode. Defaults from the profile, or api_key without a profile.
auth_profilestringOptional named auth choice for profiles with more than one auth path.
base_urlstringProvider endpoint. Required when no profile supplies a default.
models_urlstringOptional model-catalog endpoint. Used for listing models when supported.
credential_refstringPreferred credential reference. It wins over api_key_ref when both are set.
api_key_refstringBackward-compatible API-key reference. Use credential_ref for new config.
default_modelstringProvider-local default model shown by setup and status surfaces.
modelslistOptional manual model entries and per-model capability overrides.
aliasesmapOptional model alias map.
auxiliary_modelsmapOptional provider-local aliases for auxiliary roles.
capabilitiesmapProvider-wide capability overrides.
fallback_chainlistProvider-local fallback chain.
enabledboolOptional switch. Omitted means the provider is enabled.

Unknown provider fields fail config validation. Keep provider ids stable once sessions or saved config refer to them.

API Modes

api_mode must be one of these values:

ValueUse
openai-compatibleOpenAI-compatible chat/completions endpoints and many hosted model routers.
anthropic-messagesAnthropic Messages-compatible endpoints.
google-geminiNative Google Gemini API.
openai-responsesOpenAI Responses API.
codex-responsesCodex Responses backend used by the openai-codex profile.

Do not invent adapter names. For example, DeepSeek uses openai-compatible; a deepseek-compatible value is rejected.

Provider Profiles

Use Provider Integrations as the source for setup-ready profile ids, profile aliases, blocked setup entries, custom endpoint patterns, and auth-mode guidance.

This reference focuses on the YAML fields accepted after you have chosen a provider shape.

Credentials

Provider credential references use the same reference schemes as the secret system: env:NAME, file:/path/to/token, or secret:name. Literal credentials are not allowed in provider credential fields.

credential_ref is the preferred field. If both credential_ref and api_key_ref are present, Anyy uses credential_ref as the effective credential and still validates the older api_key_ref.

Auth-mode rules:

auth_modeCredential rule
api_keyUse credential_ref or api_key_ref.
oauthUse credential_ref when a credential reference is needed; api_key_ref is rejected.
external_processUse credential_ref when needed; api_key_ref is rejected.
aws_sdkUse credential_ref when needed; api_key_ref is rejected.
noneNo credential refs are allowed, and the base URL must be local or private.

auth_mode: none is for local or private providers such as a local LM Studio endpoint. It is rejected for public internet endpoints.

Models

Manual model entries are optional. They are useful when a provider catalog is empty, when you want a friendly display name, or when a model needs capability overrides.

providers:
- id: local
profile: lmstudio
models:
- id: local-model
display_name: Local Model
capabilities:
tool_calls: true
streaming: true
max_context_tokens: 32768

models[].id is the model id passed to the provider. models[].capabilities overrides or supplements provider-wide capabilities for that model.

Capability Overrides

Capabilities are exact overrides. Omit a key when you want the built-in profile or provider adapter to decide.

Boolean capability keys:

developer_messages, tool_choice_without_tools, streaming, tool_calls, json_schema, usage_metadata, multimodal_input, video_input, image_generation, reasoning_input, reasoning_output, reasoning_replay, reasoning_requires_same_provider, reasoning_requires_same_model, prompt_cache_explicit, prompt_cache_implicit, credential_refresh, credential_pool, and account_scoped_rate_limits.

Numeric and string capability keys:

FieldMeaning
max_context_tokensMaximum model context window Anyy should assume.
max_output_tokensMaximum output tokens Anyy should request or allow.
max_request_bytesRequest-size guardrail.
max_tool_result_charsTool-result budget for provider compatibility.
prompt_cache_ttlPrompt-cache time-to-live label for providers that expose it.

Negative token or output limits are rejected during validation.

Auxiliary Models

Auxiliary model slots live at the top level, not inside a provider entry:

auxiliary_models:
image_understanding:
- provider_id: gemini
model: gemini-2.5-flash
video_understanding: []
speech_synthesis: []
search: []
image_generation: []

Available slots are fallback, image_understanding, video_understanding, speech_synthesis, search, and image_generation.

Each entry accepts:

FieldMeaning
provider_idProvider id to use for that auxiliary job.
modelModel id to pass to that provider.
enabledOptional switch. Omitted means enabled.
extra_bodyExtra request body fields for providers that support them.
allow_reasoning_dropAllow fallback to drop reasoning continuity when needed.
allow_context_dropAllow fallback to retry without full context when needed.
max_attemptsPer-entry retry limit.

Image and video auxiliary entries are mirrored with media_understanding.image.models and media_understanding.video.models when one side is empty, so old and new config shapes stay compatible.

Fallback Chain

The recommended setup path writes fallback models under auxiliary_models.fallback:

auxiliary_models:
fallback:
- provider_id: openrouter
model: anthropic/claude-sonnet-4
max_attempts: 1
- provider_id: gemini
model: gemini-2.5-pro
allow_reasoning_drop: true

At runtime, Anyy copies this list to the main provider's effective fallback_chain when the provider does not already define one.

Provider-local fallback_chain entries use the same fields as auxiliary fallback entries. Every provider_id must reference a configured provider, and max_attempts cannot be negative.

Fallback is a resilience path, not a way to bypass capability requirements. A candidate can still be skipped if it cannot satisfy required tools, media, context, or reasoning continuity.

Validation Notes

Run anyy config after hand-editing config.yaml. It prints the resolved provider, API mode, auth reference status, model, and max-turn settings.

Use anyy doctor for a broader runtime check. Provider request failures still surface when a model is actually used; there is no separate provider health-check block in config.yaml.