Stelladocs
API Providers

API Providers

Every provider Stella speaks to — the full matrix, the auto-detection order, and the credential chain. Bring your own key; Stella talks each provider's native dialect.

Stella is BYOK — bring your own key — and vendor-agnostic by construction. There is no proxy in the middle and no markup on your tokens: Stella speaks each provider's native wire dialect directly — Anthropic Messages, OpenAI Responses, Gemini generateContent, Bedrock Converse, and the OpenAI-compatible dialect the rest of the field converged on. Switching vendors is a --model flag, not a migration.

The provider matrix

ProvideridPrimary env varDefault modelDialect
AnthropicanthropicANTHROPIC_API_KEYclaude-fable-5Anthropic Messages
OpenAIopenaiOPENAI_API_KEYgpt-5.5OpenAI Responses
Google GeminigeminiGEMINI_API_KEY (alias GOOGLE_API_KEY)gemini-3-proGemini generateContent
Google Vertex AIvertexVERTEX_ACCESS_TOKENgemini-3-proGemini via Vertex
Amazon BedrockbedrockAWS_ACCESS_KEY_IDus.anthropic.claude-sonnet-4-5-20250929-v1:0Bedrock Converse
xAIxaiXAI_API_KEYgrok-4OpenAI-compatible
DeepSeekdeepseekDEEPSEEK_API_KEYdeepseek-chatOpenAI-compatible
Z.aizaiZAI_API_KEYglm-5.2OpenAI-compatible
OpenRouteropenrouterOPENROUTER_API_KEYopenrouter/autoOpenAI-compatible
Locallocalnone (optional LOCAL_API_KEY)you chooseOpenAI-compatible

Each provider name links to its dedicated page — setup, model selection, provider-specific configuration, and catalog pricing. For a quick first-run walkthrough, see Providers & models.

Auto-detection

With no --model flag and no configured default, Stella selects the first provider that has a resolvable credential, in this preference order:

  1. zai
  2. anthropic
  3. openai
  4. xai
  5. deepseek
  6. gemini
  7. openrouter
  8. vertex and bedrocklast, deliberately

Vertex and Bedrock sit last on purpose: they key off generic cloud credentials (VERTEX_ACCESS_TOKEN, AWS_ACCESS_KEY_ID) that are often present in a shell for entirely unrelated reasons. Generic cloud credentials must not hijack detection — pin these providers explicitly with --model vertex/… or --model bedrock/… when you want them. The local pseudo-provider is never auto-detected at all.

The "configured default" above is a real resolution layer with a name: agent_engine_config's default_model. It sits between the --model flag and auto-detection — an explicit flag always wins, but a settings-configured default beats "first provider with a key":

~/.config/stella/settings.json
{
  "agent_engine_config": {
    "default_model": "anthropic/claude-fable-5"
  }
}

The credential chain

For the selected provider, Stella resolves the API key in this order — first hit wins:

  1. The --api-key flag (requires an explicit --model provider/...)
  2. The provider's env var, plus aliases — e.g. GOOGLE_API_KEY for Gemini
  3. settings.json providers.<id>.api_key
  4. ~/.config/stella/credentials.toml
  5. An interactive prompt (on a TTY) — the entered key is saved to credentials.toml, so you are only prompted once

See Credentials for the file format and the fine print.

Prefer an env var, settings.json, or credentials.toml over --api-key for anything long-lived — a flag value is visible in shell history and in ps output.

Overriding the key source

Two settings.json fields reroute steps 2 and 3 of the chain — every provider page's "reference an env var" option is this mechanism, documented once here:

  • providers.<id>.api_key_env renames the provider's primary credential var: the named var becomes the one Stella checks first, and the original (ANTHROPIC_API_KEY, OPENAI_API_KEY, …) demotes to an alias — so the standard var keeps working as a fallback.
  • providers.<id>.api_key embeds the key literal inline — step 3 of the chain. Fine for a scratch machine; credentials.toml is the better home for anything long-lived.
~/.config/stella/settings.json
{
  "providers": {
    "anthropic": {
      "api_key_env": "MY_TEAM_ANTHROPIC_KEY"
    }
  }
}

Scope matters. In a project's .stella/settings.json, the credential-routing fields — base_url, api_key, api_key_env — are ignored (with a stderr notice) unless you export STELLA_TRUST_PROJECT=1: a cloned repo must not be able to redirect where your key is sent. User scope (~/.config/stella/settings.json) always applies — put personal overrides there. See the project trust boundary.

Where to go next

  • Choosing a model — the Model guide is the master catalog: context windows, list prices, and which model fits which role.
  • Tuning profilesExamples has ready-made lineups from max-quality to dirt-cheap.
  • Per-agent routingAgent engine config gives each engine agent (worker, judge, triage) its own model, provider, and effort — including a different gateway per agent.

Stella is totally free and open source, dual-licensed MIT or Apache 2.0— your choice: MIT's three-paragraph simplicity, or Apache 2.0's explicit patent grant that enterprises prefer. Use it, fork it, embed it, ship it — no account, no phone-home, no strings. What that means →

On this page