Set up TRAE / CodeBuddy
ByteDance TRAE and Tencent CodeBuddy AI IDEs; add a custom model to connect
- API format: OpenAI Chat Completions
- Base URL format: Up to /v1 (https://gpt.cherrychat.org/v1)
- Recommended model: claude-sonnet-5-5, gpt-6.1-sol
- Platforms: macOS, Windows, VS Code, JetBrains
Steps
TRAE: open the Add Model window
In the IDE or Agent window go to Settings > Models, click Add Model and choose Custom Model in the dialog.
TRAE: fill in the custom model
API Format: "OpenAI Chat Completions". Keep the Full URL switch off and enter the request URL up to /v1. For GPT models choose "GPT-5 series" under Advanced Settings → Model Series. Claude models can use "Anthropic Messages" instead, with just https://gpt.cherrychat.org as the URL.
- Custom Request URL: https://gpt.cherrychat.org/v1 (Up to /v1 while Full URL is off)
- Model ID: claude-sonnet-5-5
- API Key: sk-your-key
TRAE: add and select
Click Add Model; TRAE checks the key and adds the model on success. Then click the model name at the bottom right of the chat box and switch to it.
CodeBuddy: edit models.json
Open ~/.codebuddy/models.json (%USERPROFILE%\.codebuddy\models.json on Windows), create it if missing, and paste the content below. url must be the full path ending in /chat/completions, and apiKey is the key itself. It reloads on save; the model shows up with a custom tag.
- url (full URL): https://gpt.cherrychat.org/v1/chat/completions (CodeBuddy needs the full path)
- apiKey: sk-your-key
~/.codebuddy/models.json
{ "models": [ { "id": "claude-sonnet-5-5", "name": "claude-sonnet-5-5", "vendor": "OpenAI", "apiKey": "sk-your-key", "url": "https://gpt.cherrychat.org/v1/chat/completions", "maxInputTokens": 128000, "maxOutputTokens": 8192, "supportsToolCall": true, "supportsImages": false } ] }
Common pitfalls
- They differ: TRAE with Full URL off takes /v1 (https://gpt.cherrychat.org/v1); CodeBuddy's url must be the full https://gpt.cherrychat.org/v1/chat/completions.
- For GPT models in TRAE, choose "GPT-5 series" so it sends max_completion_tokens; otherwise you may get a 400 parameter error.
- CodeBuddy only supports the OpenAI Chat format, and agent mode needs supportsToolCall set to true.
- A project's .codebuddy/models.json overrides the user one and contains the key, so keep it out of Git.
- Labels differ slightly between the China and international editions; follow what the app shows.
Error → cause → fix
| What you see | Why | What to do |
|---|---|---|
| Check fails with 401 when adding | The key is wrong, has spaces, or was disabled | Copy the key again from My Keys and paste it |
| HTTP 404 Not Found | TRAE has Full URL off but https://gpt.cherrychat.org/v1/chat/completions entered, or the CodeBuddy url stops at /v1 | TRAE: https://gpt.cherrychat.org/v1; CodeBuddy: https://gpt.cherrychat.org/v1/chat/completions |
| 400 saying max_tokens or another parameter is unsupported | GPT models require max_completion_tokens | In TRAE, set Advanced Settings → Model Series to "GPT-5 series" |
| Model not found | Model ID / id is misspelled (case or spaces) | Copy it from the Models page, e.g. claude-sonnet-5-5 |
| HTTP 402 or "insufficient balance" (billing_error in Claude format) | Your credits cannot cover this call. API calls are paid from credits only; memberships and unlimited plans do not apply | Top up any amount in the CherryChat Store, then retry after a few seconds |
| HTTP 429 Too Many Requests | Too many requests: by default 120 per minute per key and 8 at a time per account | Lower the concurrency or requests per second in the tool and wait for the Retry-After seconds; most tools retry on their own |
Guide checked 2026-11-02. The tool's screens may change; the official docs win if they differ.
Operated by UK Company CHERRYCHAT LTD · Company Number 16096119 · Support WeChat: JsnonoChat · Content is AI-generated — please verify before relying on it
