Skip to content

Providers

KodaCode separates provider identity from provider credentials.

  • config.yaml declares which providers exist and which model routes to use.
  • auth.yaml stores API keys and OAuth state.
  • Model references use provider_id/model_id, such as openai/gpt-5.

The fastest setup path is the /connect dialog inside the TUI. It writes the provider entry and credential entry for you. You can also edit the files manually when you want repeatable machine setup.

Default locations:

FilePurpose
~/.config/kodacode/config.yamlProvider IDs, base URLs, model routes, budgets, and runtime settings
~/.config/kodacode/auth.yamlAPI keys, OAuth tokens, and provider account state

Credentials do not belong in config.yaml.

The /connect dialog includes native providers and OpenAI-compatible presets:

Provider IDNameNotes
openaiOpenAIOpenAI Platform API key
openai-codexOpenAI Codex OAuthChatGPT/Codex OAuth account created by the OpenAI /connect flow
anthropicAnthropicNative Anthropic Messages API
googleGoogleNative Gemini API
nvidiaNVIDIANVIDIA API endpoint
github-copilotGitHub CopilotOAuth/token-backed GitHub Copilot route
deepseekDeepSeekDeepSeek API route
qwencloudQwenCloudOpenAI-compatible preset
openrouterOpenRouterOpenAI-compatible preset
togetheraiTogether AIOpenAI-compatible preset
groqGroqOpenAI-compatible preset
fireworks-aiFireworks AIOpenAI-compatible preset
mistralMistralOpenAI-compatible preset
cerebrasCerebrasOpenAI-compatible preset
deepinfraDeep InfraOpenAI-compatible preset
moonshotaiMoonshot AI (Kimi)OpenAI-compatible preset
veniceVenice AIOpenAI-compatible preset
zai-coding-planZ.AIOpenAI-compatible preset
ollama-cloudOllama CloudOpenAI-compatible preset
ollamaOllamaLocal OpenAI-compatible preset; API key is optional
lmstudioLM StudioLocal OpenAI-compatible preset; API key is optional
llamacppllama.cppLocal OpenAI-compatible preset; API key is optional
custom IDCustom CompatibleAny OpenAI-compatible endpoint with your chosen provider ID

openai and openai-codex are intentionally separate routes. openai uses an OpenAI Platform API key. openai-codex uses ChatGPT/Codex OAuth state from the OpenAI connect flow.

Manual API-key setup uses matching provider IDs in both files.

config.yaml:

version: 1
providers:
- id: openai
- id: anthropic
model:
primary: openai/gpt-5
utility_model: openai/gpt-5-mini

auth.yaml:

openai:
type: api
access: "sk-..."
anthropic:
type: api
access: "sk-ant-..."

The key under auth.yaml must match the provider id from config.yaml.

OpenAI-compatible providers use an id plus base_url in config.yaml.

version: 1
providers:
- id: openrouter
base_url: https://openrouter.ai/api/v1
- id: ollama
base_url: http://localhost:11434/v1
model:
primary: openrouter/openai/gpt-5

auth.yaml:

openrouter:
type: api
access: "sk-or-..."
ollama:
type: api
access: ""

Local providers such as Ollama, LM Studio, and llama.cpp can use an empty API key when the local endpoint does not require authentication.

After a provider is connected, select models from inside the TUI:

  • /model changes the primary model route.
  • /utility-model changes the background utility model route.
  • /reviewer-model changes the model used for reviewer turns.

For saved defaults, set the same routes in config.yaml:

model:
primary: anthropic/claude-sonnet-4-6
utility_model: openai/gpt-5-mini
workflow:
review_model:
primary: openai/gpt-5-mini

See Model Routing for routing behavior, model_overrides, reasoning controls, and model catalog refresh details.

KodaCode refreshes remote model catalogs and caches them in the data directory. Some compatible providers return incomplete model metadata. When context windows, output caps, capabilities, or pricing are missing, add model_overrides in config.yaml.

model_overrides:
- ref: qwencloud/qwen3.6-plus
name: Qwen3.6 Plus
context_size: 1000000
max_input_tokens: 1000000
max_output_tokens: 64000
default_output_tokens: 16000
reasoning: true
tool_calls: true
vision: true

See Configuration for the full persisted configuration surface.

Model providers are separate from web_search providers. Configure Exa or Parallel under web_search.providers, not top-level providers:.

See Web Search for web-search provider examples.