Configuring Providers
What you'll accomplish: Set up LLM providers in config.toml, manage API keys, and test connectivity.
Provider configuration
Providers are configured in config.toml:
[default_model]
provider = "anthropic"
model_id = "claude-sonnet-4-20250514"
[providers.anthropic]
api_key_env = "ANTHROPIC_API_KEY"
enabled = true
[providers.openai]
api_key_env = "OPENAI_API_KEY"
enabled = true
[providers.groq]
api_key_env = "GROQ_API_KEY"
enabled = true
[providers.ollama]
base_url = "http://localhost:11434"
enabled = true
Setting API keys
# Interactive setup
hoziron config set-key anthropic
# Prompts for: ANTHROPIC_API_KEY
# Test connectivity
hoziron config test-key anthropic
Or set directly in your environment / .env file:
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GROQ_API_KEY=gsk_...
How provider auth works
| Env var state | Auth status | Effect |
|---|---|---|
| Set, non-empty | Configured | Provider is usable |
| Unset or whitespace | Missing | Provider excluded from available models |
N/A (no api_key_env) | NotRequired | Provider always usable (e.g., local Ollama) |
Keys are resolved lazily at request time:
- Adding an env var while the daemon is running makes the provider available immediately
- Removing one makes it unavailable on the next request
- No daemon restart needed for key changes
URL overrides
Point providers at internal endpoints or proxies:
[provider_urls]
anthropic = "https://api-proxy.internal.company.com/anthropic"
Disabling providers
[providers.openai]
enabled = false
Disabled providers are excluded from model resolution and complexity routing.
Listing available models
hoziron models list
Shows all models from providers with valid (Configured or NotRequired) auth status.
Next steps
Related: