Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Providers

An account is [accounts.<name>] in your user settings. Models are addressed <account>/<model>. This page helps you choose a kind and shows a minimal example of each; Configuration is the key reference.

Choosing a kind

KindServiceWireEndpointCredentialPricingNotable
anthropicAnthropic API or a host of itMessageshttps://api.anthropic.comrequiredpricedprompt caching, native web search
openaiOpenAI APIResponseshttps://api.openai.com/v1requiredpriced
geminiGemini APIgenerateContenthttps://generativelanguage.googleapis.comrequiredpriced
openai-compatibleAny Chat Completions serverChat Completionsbase_url requiredoptionalunpricedquota = "kimi"
kimiKimi for CodingChat Completionshttps://api.kimi.com/coding/v1optionalunpricedquota display
ollamaLocal Ollama/api/chathttp://localhost:11434optionalpriced if catalog lists itcontext_tokens, think
opencode-goOpenCode Gofour wires, per modelhttps://opencode.ai/inference/gosign-inunpricedwires
databricksDatabricks AI Gatewayfour wires, per modelbase_url requiredrequired (Bearer)estimated (list price)wires, model_facts, thinking_off
openrouterOpenRouterChat Completionshttps://openrouter.ai/api/v1requiredpricedprompt caching, thinking_off
claude-subscriptionClaude Max or Ultra via the Claude CLIMessages, via the CLInonethe CLI’s loginunpricednative web search, plan quota

--max-budget-usd does not apply to unpriced models, and with one as the main model it is a usage error. databricks is the one kind whose prices are estimates: a model whose vendor lists a price is counted at that list price, so the flag and the dollar caps work there too. Native web search is offered for anthropic and claude-subscription only; see [websearch].

Easily confused choices

  • kimi or openai-compatible. kimi is the flat-rate Kimi for Coding subscription, with quota built in. Moonshot’s pay-as-you-go API is openai-compatible.
  • openrouter or openai-compatible at OpenRouter. Only openrouter sends cache markers.
  • databricks or anthropic with auth = "bearer". databricks is for a workspace and routes each model to its wire. Bearer auth on anthropic is for other Messages-only gateways.
  • One wire or several. opencode-go and databricks pick the wire per model id; fix a wrong pick with wires. The other kinds have one wire.
  • claude-subscription. No Fontaine credential: the Claude CLI owns the Max or Ultra login. For API billing use anthropic. Scope and terms: Claude subscription.

anthropic

Messages API. base_url points at another host. Key from api_key_env or /login; auth = "bearer" sends it as a Bearer token. prompt_caching (default on) and cache_ttl apply. model_facts maps a host’s own model names to catalog models.

[accounts.work]
kind = "anthropic"
api_key_env = "ANTHROPIC_API_KEY"

[model]
model = "work/claude-sonnet-5"

context_editing is off by default. When enabled it asks Anthropic to clear old tool results server-side once the input passes trigger_tokens, keeping the newest keep tool uses and never clearing the exclude_tools. The host must accept the context-management-2025-06-27 beta; one that rejects it fails the request. The beta header goes on every request from the account, guardian and side calls included (only the context_management field is limited to the main agent and subagents), so a host that rejects it makes the guardian fail closed; don’t enable context_editing on an account used only for the guardian. An MCP tool in exclude_tools is named by its cleaned name, mcp__<server>__<tool>, with characters outside [A-Za-z0-9_-] turned into _. Each clearing rewrites the cached prefix from the cleared point on, so clear_at_least_tokens skips a clearing that would free little.

[accounts.work]
kind = "anthropic"
api_key_env = "ANTHROPIC_API_KEY"

[accounts.work.context_editing]
enabled = true
trigger_tokens = 100000
keep = 3
exclude_tools = ["board_show", "board_update", "memory", "todo_write", "tool_search"]

openai

Responses API. Key from api_key_env or /login.

[accounts.openai]
kind = "openai"
api_key_env = "OPENAI_API_KEY"
models = ["gpt-5.2", "gpt-4o-mini"]

[model]
model = "openai/gpt-5.2"

gemini

Native generateContent. Key from api_key_env or /login.

[accounts.google]
kind = "gemini"
api_key_env = "GEMINI_API_KEY"

[model]
model = "google/gemini-2.5-pro"

openai-compatible

Chat Completions, not Responses (LM Studio, vLLM, LiteLLM). base_url is required; no key means no Authorization header. Unlisted models never get derived facts.

[accounts.lmstudio]
kind = "openai-compatible"
base_url = "http://localhost:1234/v1"

[model]
model = "lmstudio/qwen2.5-coder-7b-instruct"

kimi

Kimi for Coding over Chat Completions. Its quota shows in the status bar with no quota key.

[accounts.kimi]
kind = "kimi"
api_key_env = "KIMI_API_KEY"

ollama

Local daemon, native /api/chat, no key needed. context_tokens (default 16384) is sent with every call; think = false skips reasoning.

[accounts.local]
kind = "ollama"
base_url = "http://localhost:11434"
context_tokens = 16384

[model]
model = "local/qwen3:4b"

opencode-go

No key: sign in with /login <account>. wires overrides the built-in routing. prompt_caching defaults to off.

[accounts.go]
kind = "opencode-go"

[accounts.go.wires]
"some-new-model" = "messages"

databricks

base_url is the workspace origin, no path. claude- models use the Messages route, gpt- (except gpt-oss-) the Responses route, gemini- the Gemini route, the rest MLflow Chat Completions. The workspace bills in DBUs, which Fontaine cannot read per call, so a model whose vendor lists a catalog price is counted at that list price and every figure it feeds is marked est.; a model no entry lists stays unpriced. model_facts maps a custom endpoint and does not change routing; a mapped endpoint takes its target’s list price. See Configuration.

[accounts.dbx]
kind = "databricks"
base_url = "https://example.cloud.databricks.com"
api_key_env = "DATABRICKS_TOKEN"

[model]
model = "dbx/system.ai.claude-sonnet-5-5"

openrouter

Model ids carry the upstream (router/anthropic/claude-sonnet-4-6). prompt_caching defaults on, except for the self-caching openai/, deepseek/, x-ai/ and groq/ upstreams.

[accounts.router]
kind = "openrouter"
api_key_env = "OPENROUTER_API_KEY"
models = ["anthropic/claude-sonnet-4-6"]

[model]
model = "router/anthropic/claude-sonnet-4-6"

claude-subscription

Runs your installed Claude CLI as the transport. Max and Ultra plans only, for individual local use; check Anthropic’s terms. Sign in with claude auth login --claudeai. Tokens show, cost never does. Checks, limits and failures: Claude subscription.

[accounts.claude]
kind = "claude-subscription"