CodeBuddy

CodeBuddy

Tencent's AI coding assistant you can point at TokenMix

What it is

CodeBuddy is Tencent Cloud's AI coding assistant, available as a VS Code and JetBrains plugin, a standalone IDE, and a command-line tool. It does code completion, chat, multi-file edits, an agent mode, and MCP tools, and ships with built-in models like Tencent Hunyuan, DeepSeek, and GLM. It also reads custom model definitions from a config file, which is how you point it at TokenMix.

Before you start

Install CodeBuddy from its official site (codebuddy.ai, or codebuddy.cn in China) — the plugin, the standalone IDE, and the CLI all share the same model config. Create a TokenMix account, open the console, and generate an API key (it looks like sk-tm-...). Pick a coding model to use, for example deepseek-v4-pro, qwen3-coder-plus, or glm-5.1.

Connecting CodeBuddy to TokenMix

CodeBuddy reads custom models from a file named models.json. Create or edit it at ~/.codebuddy/models.json for all projects, or at the project path /.codebuddy/models.json for one project. Add an entry:

{
  "id": "deepseek-v4-pro",
  "name": "DeepSeek V4 Pro (TokenMix)",
  "vendor": "OpenAI",
  "apiKey": "sk-tm-your-key",
  "url": "https://api.tokenmix.ai/v1/chat/completions",
  "maxInputTokens": 128000,
  "maxOutputTokens": 8192,
  "supportsToolCall": true
}

Set "id" to the TokenMix model you want (it is the model name sent to the API), "vendor" to OpenAI, "url" to TokenMix's chat-completions endpoint, and "apiKey" to your key. To offer several models, add one entry per model, each with its own "id". CodeBuddy reloads the file within about a second.

Verify it works

Open CodeBuddy's model picker and select the model you just added (it shows under the name you gave it). Ask it something simple, like explaining a function. If it answers, CodeBuddy is now calling your TokenMix model.

FAQ

The custom model uses the OpenAI chat-completions format, which is what TokenMix's endpoint speaks, so any chat model TokenMix serves will work — keep the "url" the same and change the "id" to switch models. Your key stays in the local file and is not uploaded. If CodeBuddy cannot reach the model, make sure the "url" ends in /v1/chat/completions and "vendor" is set to OpenAI.