Point Aider at Tium
You need the base URL https://api.tium.ai/v1 and an API key from your dashboard. Keys are shown once at creation.
1.Export the base URL and your key
Aider reads the OpenAI-compatible settings straight from the environment. Export both, then run aider from your project directory.
export OPENAI_API_BASE=https://api.tium.ai/v1 export OPENAI_API_KEY=$TIUM_API_KEY # The openai/ prefix picks the transport, not the vendor. aider --model openai/glm-5.3-flashExport both, then run aider from your project. Aider warns that it does not know this model's context window or cost, because litellm has not catalogued it; the warning is harmless, but it also makes aider report your session cost as zero. The setup guide has the metadata file that fixes both. 2.Name the model with an openai/ prefix
Run aider --model openai/glm-5.3-flash. The prefix tells aider to route through its OpenAI-compatible path; the part after it is the slug exactly as /v1/models publishes it. Any slug from the catalog works in the same field.
3.Add the model metadata to silence the cost warning
Save the file below as .aider.model.metadata.json in your home directory, your repo root, or the directory you run aider from. Aider loads all three. Without it, aider warns that it does not know this model's context window or cost.
{
"openai/deepseek-v4-flash": {
"max_tokens": 32768,
"max_input_tokens": 1000000,
"max_output_tokens": 32768,
"input_cost_per_token": 8.89492e-7,
"output_cost_per_token": 0.000002668476,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": false,
"cache_read_input_token_cost": 2.8e-8,
"cache_creation_input_token_cost": 0
},
"openai/deepseek-v4-pro": {
"max_tokens": 32768,
"max_input_tokens": 1000000,
"max_output_tokens": 32768,
"input_cost_per_token": 0.000002668474,
"output_cost_per_token": 0.000008005422,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": false,
"cache_read_input_token_cost": 8.9e-8,
"cache_creation_input_token_cost": 0
},
"openai/glm-5.3": {
"max_tokens": 32768,
"max_input_tokens": 1000000,
"max_output_tokens": 32768,
"input_cost_per_token": 0.0000028302,
"output_cost_per_token": 0.000008894914,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": true,
"cache_read_input_token_cost": 5.26e-7,
"cache_creation_input_token_cost": 0,
"supports_response_schema": true
},
"openai/glm-5.3-flash": {
"max_tokens": 32768,
"max_input_tokens": 1000000,
"max_output_tokens": 32768,
"input_cost_per_token": 1.51617e-7,
"output_cost_per_token": 5.0539e-7,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": true,
"cache_read_input_token_cost": 3e-8,
"cache_creation_input_token_cost": 0,
"supports_vision": true,
"supports_response_schema": true
},
"openai/kimi-k3": {
"max_tokens": 32768,
"max_input_tokens": 1000000,
"max_output_tokens": 32768,
"input_cost_per_token": 0.000006064714,
"output_cost_per_token": 0.00003032357,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": true,
"cache_read_input_token_cost": 6.06e-7,
"cache_creation_input_token_cost": 0,
"supports_vision": true,
"supports_response_schema": true
}
}Check that it worked
Aider prints the model and its resolved metadata at startup. If the file loaded, the context window and pricing appear in place of the warning.
aider --model openai/glm-5.3-flash --verboseEvery response also carries its own cost and your remaining balance in the X-Tium-* headers. See the header reference.
What Aider gets wrong
Tool-specific behaviour that surprises people, and what to do about it.
The warning is harmless; the cost reporting is the reason to fix it
Aider never enforces token limits itself, so the unknown-context warning changes nothing about what gets sent. What it does change is aider's running cost display, which reads these numbers. If you watch spend in aider rather than on your dashboard, add the file.
Context is the measured window, and it is the same one we enforce
The metadata says 1,000,000 input tokens because that is the window each of these models actually has, read from the providers' own documentation rather than an aggregator. It matches what /v1/models reports and what the gateway enforces: a request that does not fit is refused before anything is sent upstream, so you are never billed for a prompt that was too long. It was published as 128,000 until 2026-09-12, which understated it.
DeepSeek models refuse tool_choice="required" while reasoning
The two DeepSeek entries are marked supports_tool_choice: false for that reason. Function calling itself works on all five models.