Models & config
Anturno has no built-in default provider. You add named model entries in user config, then connect and select them in the TUI.
Config shape
Edit ~/.anturno/config.json (user scope only — project config cannot define or select models):
{
"models": [
{
"id": "openai",
"displayName": "OpenAI",
"baseUrl": "https://api.openai.com/v1",
"modelId": "gpt-4.1",
"apiKey": "${OPENAI_API_KEY}",
"contextWindowTokens": 128000,
"inputCostPerMTok": 3,
"outputCostPerMTok": 15
}
],
"modelRoles": { "main": "openai" }
}
| Field | Purpose |
|---|---|
id | How you refer to it: /connect openai, /model openai |
baseUrl / modelId | Endpoint and model name |
apiKey | ${ENV_VAR} reference, a literal (local only), or omit and supply later via /connect |
contextWindowTokens | Context window for compaction and the TUI meter (default 128000) |
inputCostPerMTok / outputCostPerMTok | Optional; without them /cost shows “cost n/a” |
The supported production path speaks the OpenAI Responses API. A custom baseUrl must speak that protocol.
Why user scope only
models and modelRoles are never read from project config. A repo could otherwise redirect model calls through an attacker-controlled endpoint carrying your API key.
Connect → model → cost
/connect <id> <key>stores the key under~/.anturno/credentials.json(mode0600)./model <id>sets the active model for the project.- Turns run against that entry — key resolution order: inline config value → stored credential → named env var.
/costattributes dollars using the per-MTok rates, when configured.- Resuming a session re-adopts the model it was on.
With an empty models[], first-run tips you to add config instead of showing an empty connect picker.
Derived env key
If you omit apiKey and never run /connect, Anturno also looks for ANTURNO_MODEL_<ID>_API_KEY (uppercase id).