Reference
Providers and models
The AI providers Duscode supports and their key variables, the default model catalogue with tiers and prices, local models with Ollama or LM Studio, and adding any OpenAI-compatible endpoint.
Duscode calls providers directly with your own API keys. Add keys in Settings → Models & keys (see Add a provider key), or set the variables in your environment.
Supported providers
| Provider | id | Key variable | Default models |
|---|---|---|---|
| Anthropic | anthropic |
ANTHROPIC_API_KEY |
fast, standard, frontier |
| OpenAI | openai |
OPENAI_API_KEY |
fast, standard, frontier, images |
| Google Gemini | gemini |
GEMINI_API_KEY |
fast |
| DeepSeek | deepseek |
DEEPSEEK_API_KEY |
fast |
| xAI | xai |
XAI_API_KEY |
add your own |
| Mistral | mistral |
MISTRAL_API_KEY |
add your own |
| Groq | groq |
GROQ_API_KEY |
add your own |
| OpenRouter | openrouter |
OPENROUTER_API_KEY |
add your own |
| Together | together |
TOGETHER_API_KEY |
add your own |
| Fireworks | fireworks |
FIREWORKS_API_KEY |
add your own |
| Cerebras | cerebras |
CEREBRAS_API_KEY |
add your own |
| Moonshot (Kimi) | moonshot |
MOONSHOT_API_KEY |
add your own |
| Qwen (DashScope) | qwen |
DASHSCOPE_API_KEY |
add your own |
| Ollama (local) | ollama |
none | add your own |
| LM Studio (local) | lmstudio |
none | add your own |
"Add your own" means the connection is preset, but you list the models you want to use. See Add a model.
Tip
For automatic routing across all three tiers with no setup, use an Anthropic or OpenAI key. With keys for both, Duscode can also fall back from one to the other when a provider is overloaded.
Default models
Prices are in US dollars per million tokens.
| id | Provider model | Tier | Input | Output | Cached input | Reads images | Web search |
|---|---|---|---|---|---|---|---|
claude-haiku |
claude-haiku-5-5 |
fast | 0.10 | 0.50 | 0.01 | Yes | — |
claude-sonnet |
claude-sonnet-5-5 |
standard | 2 | 10 | 0.20 | Yes | Yes |
claude-opus |
claude-opus-5-5 |
frontier | 4 | 20 | 0.20 | Yes | Yes |
gpt-luna |
gpt-6-luna |
fast | 0.10 | 0.50 | 0.01 | Yes | Yes |
gpt-sol |
gpt-6.1-sol |
standard | 2 | 10 | 0.10 | Yes | Yes |
gpt-astra |
gpt-6-astra |
frontier | 10 | 50 | 1 | Yes | Yes |
deepseek-chat |
deepseek-chat |
fast | 0.27 | 1.10 | 0.07 | — | — |
gemini-flash |
gemini-2.5-flash |
fast | 0.30 | 2.50 | — | Yes | — |
gpt-image |
gpt-image-2 |
images | $0.053 per 1024×1024 image |
Anthropic prices come from Anthropic's published price list. OpenAI prices were read from OpenAI's pricing page in October 2026, and OpenAI prompts over 272K tokens cost more than shown. The DeepSeek and Gemini figures are estimates: check them against each provider's pricing page. Your provider's bill is always the final word.
Only models whose provider has a key appear in the model picker and are used for routing. Use /models in the terminal app to list what's available.
Choose preferred models per tier
tiers lists the models to prefer for each tier, in order:
{
"tiers": {
"fast": ["claude-haiku"],
"standard": ["claude-sonnet", "gpt-sol"],
"frontier": ["claude-opus"]
}
}Add a model
Add entries to models in your config. This one adds a Mistral model to the standard tier:
{
"models": [
{
"id": "mistral-large",
"provider": "mistral",
"model": "mistral-large-latest",
"kind": "chat",
"tier": "standard",
"contextWindow": 128000,
"price": { "input": 2, "output": 6 }
}
]
}| Field | Meaning |
|---|---|
id |
Your name for the model, used in the picker, /model and tiers. Reusing a built-in id replaces that entry. |
provider |
A provider id from the table above, or one you added |
model |
The model name the provider's API expects |
kind |
"chat" or "image" |
tier |
"fast", "standard" or "frontier" |
contextWindow |
Context size in tokens. Used to decide when to compact. |
price |
input, output, and optionally cacheRead, cacheWrite (US dollars per million tokens), perImage, perWebSearch |
vision |
true if the model reads images and PDFs |
Use the provider's real prices, so costs and savings are right.
Local models: Ollama and LM Studio
Local providers need no key, but you turn them on and list your models. In ~/.duscode/config.json:
{
"providers": { "ollama": { "enabled": true } },
"models": [
{ "id": "qwen-coder", "provider": "ollama", "model": "qwen2.5-coder:14b", "kind": "chat", "tier": "fast", "price": { "input": 0, "output": 0 } }
]
}Duscode expects Ollama at http://localhost:11434/v1 and LM Studio at http://localhost:1234/v1. Local models must support tool calling to work as Dus.
Any OpenAI-compatible endpoint
Add a provider with its address and the variable that holds its key. This has to go in your user config, ~/.duscode/config.json, because a project config can't set where keys are sent:
{
"providers": {
"mygateway": { "protocol": "openai", "baseURL": "https://gateway.example.com/v1", "apiKeyEnv": "MYGATEWAY_API_KEY" }
},
"models": [
{ "id": "gw-standard", "provider": "mygateway", "model": "vendor/model-name", "kind": "chat", "tier": "standard", "price": { "input": 1, "output": 3 } }
]
}Settings lists only the providers Duscode knows, so give a custom provider's key as an environment variable, or add it to ~/.duscode/.env:
MYGATEWAY_API_KEY=...Like the built-in key variables, it's hidden from commands Dus runs.
Turn a provider off
{ "providers": { "gemini": { "enabled": false } } }Note
Duscode uses official API keys only, never consumer chat subscriptions. Amazon Bedrock, Google Vertex AI and Azure are planned. See Coming soon.