Set Up A Provider
Use this guide for the shortest path to a working model backend. Use Provider Integrations for provider fields, and Configuring Models for main model, auxiliary models, and fallback routing.
What You Are Setting Up
Provider setup creates two things:
| Part | Meaning |
|---|---|
| Provider entry | How Anyy reaches and authenticates to a model service. |
| Main model | The provider/model pair used for ordinary chat and tool turns. |
Auxiliary media models and fallback routing are configured separately. Do not put media or fallback settings into this guide's manual provider snippets unless that is the specific behavior you are setting up.
Run The Wizard
anyy setup model
The wizard requires an interactive terminal. It asks you to choose a provider template, authenticate, and choose a model. On confirmation it writes a provider entry plus synchronized main-model fields.
Check the result:
anyy config
The config view is read-only. It reports the resolved model, provider, API mode, base URL, auth reference status, and max-turn setting.
Use Credential References
Provider credentials should be references:
| Ref | Use |
|---|---|
env:NAME | Value supplied by the shell or service manager. |
file:/absolute/path | Credential stored outside Anyy home. |
secret:name | Profile-local secret managed by Anyy. |
Do not write raw API keys into config.yaml. Provider credential fields reject
literal: values.
Manual Local Provider
Use a local OpenAI-compatible endpoint when you run a local model server:
providers:
- id: local
api_mode: openai-compatible
auth_mode: none
base_url: http://127.0.0.1:1234/v1
default_model: local-model
main_model:
provider_id: local
model: local-model
auth_mode: none is accepted only for local or private endpoints. Public internet
endpoints without auth are rejected by config validation.
Add Fallback After The Main Model Works
Configure fallback only after anyy chat works with the main model:
anyy setup model fallback
The fallback wizard requires an existing main model. It uses configured providers
with default models and writes the canonical auxiliary_models.fallback chain.
Fallback is a resilience path for eligible provider errors. A candidate can still be skipped when it cannot satisfy the turn's tools, media, context, or continuity requirements.
Verify The Setup
Use:
anyy config
anyy doctor
anyy chat "Say hello in one sentence."
If the resident gateway is running while provider config changes, restart or reload the runtime path that owns provider state before testing resident sessions.
Troubleshooting
| Symptom | Check |
|---|---|
setup model refuses to run | It requires an interactive terminal. |
anyy config shows an unset auth ref | Export the env var, create the secret: file, or fix the file: path. |
| Local endpoint is rejected | auth_mode: none requires a local or private base_url. |
| Chat fails after config edits | Run anyy config, then restart/reload the gateway before testing resident sessions. |
| Fallback setup fails | Configure the main model first and ensure fallback providers have usable default models. |