Skip to main content

CodeBuddy / WorkBuddy

CodeBuddy and WorkBuddy are AI coding tools from Tencent Cloud. Both support custom model providers through a models.json configuration file. Connect them to ShuYou to use ShuYou’s model catalog with a single API key.
CodeBuddy and WorkBuddy use the same configuration format. The steps below apply to both.

Prerequisites

  1. Install CodeBuddy or WorkBuddy.
  2. Create a ShuYou API key in the console.
ShuYou OpenAI-compatible chat completions endpoint: https://api.shuyou.ai/v1/chat/completions
Currently, CodeBuddy / WorkBuddy integration with ShuYou uses the OpenAI SDK format (Chat Completions). Use model slugs from the ShuYou model list that are labeled OpenAI API Compatible.

Configuration

Step 1: Open the configuration file

CodeBuddy: ~/.codebuddy/models.json WorkBuddy: ~/.workbuddy/models.json On Windows:
  • CodeBuddy: C:\Users\<username>\.codebuddy\models.json
  • WorkBuddy: C:\Users\<username>\.workbuddy\models.json

Step 2: Add ShuYou model entries

Edit models.json and add entries like the following:
{
  "models": [
    {
      "id": "ShuYou/auto",
      "name": "ShuYou Auto (Smart Routing)",
      "vendor": "ShuYou",
      "apiKey": "YOUR_SHUYOU_API_KEY",
      "url": "https://api.shuyou.ai/v1/chat/completions",
      "supportsToolCall": true,
      "supportsImages": true
    },
    {
      "id": "openai/gpt-5",
      "name": "ShuYou GPT-5",
      "vendor": "OpenAI",
      "apiKey": "YOUR_SHUYOU_API_KEY",
      "url": "https://api.shuyou.ai/v1/chat/completions",
      "supportsToolCall": true,
      "supportsImages": true
    },
    {
      "id": "anthropic/claude-sonnet-4.5",
      "name": "ShuYou Claude Sonnet 4.5",
      "vendor": "Anthropic",
      "apiKey": "YOUR_SHUYOU_API_KEY",
      "url": "https://api.shuyou.ai/v1/chat/completions",
      "supportsToolCall": true,
      "supportsImages": true
    }
  ]
}
Replace YOUR_SHUYOU_API_KEY with your real ShuYou API key from the console.
FieldDescription
idModel slug from ShuYou models
nameDisplay name in the model dropdown
urlMust be https://api.shuyou.ai/v1/chat/completions
supportsToolCall / supportsImagesSet based on the model’s capabilities

More available models

Add more objects to the models array using the same format. Example slugs (verify availability on ShuYou): GPT series: openai/gpt-5, openai/gpt-4o Claude series: anthropic/claude-sonnet-4.5, anthropic/claude-haiku-4.5 Gemini series: google/gemini-2.5-pro, google/gemini-2.5-flash Other: deepseek/deepseek-chat, qwen/qwen3-coder-plus See the full list on shuyou.ai/models.

Step 3: Save and reload

After saving models.json, the tool detects changes and reloads automatically (about 1 second debounce). Select a ShuYou model from the model dropdown to start.

Using ShuYou Auto smart routing

What is ShuYou Auto?

ShuYou/auto is ShuYou’s intelligent routing model. The platform selects a suitable model based on request content and your routing configuration.

Benefits

  • Smart matching — Analyzes the task and picks an appropriate model
  • Cost optimization — Balances quality and price
  • Load balancing — Distributes traffic across the model pool
  • Transparent — The response includes the actual model used

Usage

Add an entry with "id": "ShuYou/auto" as shown above, then select ShuYou Auto (Smart Routing) in the model dropdown. For advanced routing options, see Model Routing.

Limit the model dropdown

To show only specific models, use availableModels:
{
  "models": [
    // ... model entries
  ],
  "availableModels": [
    "ShuYou/auto",
    "openai/gpt-5",
    "anthropic/claude-sonnet-4.5"
  ]
}

Project-level configuration

In addition to user-level config, you can add project-scoped files:
  • CodeBuddy: <project-root>/.codebuddy/models.json
  • WorkBuddy: <project-root>/.workbuddy/models.json
Project-level configuration overrides user-level settings. Use user-level config for global models and project-level config for repo-specific models.

FAQ

Configuration not applied?

  1. Validate JSON syntax (use a JSON linter).
  2. Confirm the API key and model slugs are correct.
  3. Restart the application if changes are not picked up.

Which models are supported?

Any model on ShuYou that supports the OpenAI Chat Completions protocol. Filter OpenAI API Compatible on the model list.

Is the API key secure?

The key is stored locally in models.json. Restrict file permissions so other users on the machine cannot read it.