Skip to content

Connect CodeBuddy

Overview

CodeBuddy Code (@tencent-ai/codebuddy-code) is Tencent Cloud's terminal AI coding assistant. It supports any OpenAI-compatible endpoint through a models.json configuration file. Wuliang Open AI provides a fully OpenAI-compatible API that can be set as CodeBuddy's custom model backend.

Prerequisites

  • Node.js installed (v18 or later recommended)
  • An API Key created on the Wuliang Open AI platform

Configuration Steps

1. Install CodeBuddy Code

bash
npm install -g @tencent-ai/codebuddy-code
codebuddy --version   # verify installation

2. Get Your API Key

Log in to the Wuliang Open AI console and go to Application Management → API Key Management to copy your API Key.

3. Edit models.json

Locate and edit the following file for your operating system (create it along with parent directories if needed):

OSFile Path
macOS / Linux~/.codebuddy/models.json
WindowsC:\Users\<username>\.codebuddy\models.json

Write the following content, replacing your-api-key with your API Key and the model ID with the desired model code:

json
{
  "models": [
    {
      "id": "gpt-5.5",
      "name": "GPT-5.5",
      "vendor": "Wuliang Open AI",
      "apiKey": "your-api-key",
      "url": "https://open.dieyuyun.com/v1"
    }
  ],
  "availableModels": ["gpt-5.5"]
}
FieldDescription
idModel code — must match the value in availableModels
nameDisplay name — any descriptive string
vendorVendor name — any descriptive string
apiKeyYour Wuliang Open AI API Key
urlOpenAI-compatible base URL
availableModelsList of enabled model IDs

4. Launch and Switch Model

bash
codebuddy

Complete the browser-based authorization, then type /model inside the session to switch to your configured custom model.

CodeBuddy launched successfully

Once models are configured in the models.json file above, the CodeBuddy desktop IDE automatically syncs and displays the configured models — simply select one to start using it:

CodeBuddy Desktop

API Endpoint Reference

Wuliang Open AI OpenAI-compatible endpoint details:

FieldValue
Base URLhttps://open.dieyuyun.com/v1
Auth HeaderAuthorization: Bearer your-api-key
FormatJSON

Example request:

bash
curl --request POST 'https://open.dieyuyun.com/v1/chat/completions' \
  --header 'Authorization: Bearer your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-5.5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Introduce yourself."}
    ],
    "temperature": 0.7,
    "max_tokens": 1024
  }'

Notes

  • JSON Validity: models.json must be valid JSON — CodeBuddy will fail to load an invalid file.
  • Multiple Models: Add multiple objects to the models array and list all model IDs in availableModels.
  • API Key Security: Do not commit models.json with your API Key to version control.