Trae custom model setup
Trae supports custom models. Fill a few fields and use Claude 5.5 and GPT-6 in Trae’s agent.
Updated 2026-11-16
1. Get an API key
Sign up in the TokenMilo console, top up and create a key under API Keys.
2. Add a custom model
- Open Settings → Models and click Add Model.
- Choose Custom Model.
- Fill in the table below (keep Full URL off).
- In Advanced Settings set the context window to 200000 input / 32000 output and enable image input.
- Click Add Model; Trae runs a test call.
| Field | Claude (recommended) | GPT |
|---|---|---|
| API Format | Anthropic Messages | OpenAI Chat Completions |
| Custom Request URL | https://api.tokenmilo.com (no /v1) | https://api.tokenmilo.com/v1 (with /v1) |
| Model ID | claude-sonnet-5-5 | gpt-6.1-sol |
| API Key | sk-your-key | sk-your-key |
| Model Series | Default | Default |
Repeat for more models such as claude-opus-5-5. See the model list.
3. Check it works
Select the new model in Trae’s chat, ask something, then check Usage Logs in the console.
FAQ
Which Model Series should I pick?
On personal plans the Claude series preset is enterprise-only, so choose Default. Then raise the context window manually in Advanced Settings.
Validation fails when adding the model
Usually the URL. With Full URL off, Anthropic format uses https://api.tokenmilo.com (no /v1) and OpenAI format uses https://api.tokenmilo.com/v1 (with /v1). Also check the model ID.
Why Anthropic Messages for Claude?
The native Anthropic format gives the best tool-calling and prompt-caching behaviour for Claude in agent mode.
Related guides
- Cursor setup — Add Claude and GPT models to Cursor with your own key.
- Cline setup (VS Code) — Configure the Cline coding agent with Claude via TokenMilo.
- Kilo Code setup — Add a TokenMilo custom provider to the Kilo Code agent.
- Roo Code setup (VS Code) — Use Claude 5.x and GPT-6 in Roo Code via the OpenAI Compatible provider.
- Continue setup (VS Code & JetBrains) — Configure Claude and GPT in Continue’s config.yaml.
- Zed setup — Use TokenMilo models in the Zed editor’s agent panel.
Need an API key?
Sign up at TokenMilo, top up, and create a key in the console in under a minute.