Suanlimao
← Back to all tutorials

Connect your tools

CodeBuddy

Tencent CodeBuddy: configure a custom model from the chat panel or edit models.json directly.

About 7 minFor:Developers using CodeBuddy as an IDE plugin, standalone IDE or CLI

Before you start

  • CodeBuddy is installed and you are signed in
  • A key and a model name copied from the model plaza

Step 1 · STEP 0x01

Configure a custom model from the chat panel

Chat panel → model list → Configure Custom Model
1

Base URL

https://api.suanlimao.shop/v1
2

API Key

<YOUR_API_KEY>
3

Model name

<MODEL_NAME>
4
Save
Diagram only — the real screen in your version may differ

In the model list above the chat panel open Configure Custom Model, enter the address, key and model name, and save. The official docs note you may need to restart the CodeBuddy panel before the model appears.

CodeBuddy's docs state it “currently only supports OpenAI interface format”, so this is Chat Completions only — no Anthropic format.

Create a key →

Step 2 · STEP 0x02

Or edit models.json directly

FieldValue
id (required)The model name: <MODEL_NAME>
nameDisplay name, anything you like
vendore.g. Custom
urlhttps://api.suanlimao.shop/v1/chat/completions (see the note below)
apiKeyThe key itself, not an environment variable name
maxInputTokens / maxOutputTokensPer the model's details on the plaza
supportsToolCall / supportsImages / supportsReasoningtrue / false per the model's capability
top-level availableModelsModel ids to show in the list
  • The user-level file is ~/.codebuddy/models.json (Windows: C:\Users\<user>\.codebuddy\models.json); the project-level one is <workspace>/.codebuddy/models.json. Precedence: project > user > built-in.
  • The file hot-reloads about a second after saving; models added this way carry a custom tag.
  • Copy the full JSON template from the official models.json guide; only the field meanings are listed here.
About url: the official models.json guide says it “must be the complete interface path, typically ending with /chat/completions”, while another Tencent Cloud page shows a bare base address. Try https://api.suanlimao.shop/v1/chat/completions first; on 404 switch to https://api.suanlimao.shop/v1.
Don't guess the model name: open the model plaza, click “Copy model id” on a model card and paste it. A wrong model name is the most common error.

Open the model plaza →

Step 3 · STEP 0x03

Pick the model and test

Chat panel
1

Model list

Your model (tagged custom)
2

Message box

Hello
Diagram only — the real screen in your version may differ
  • Choose the model in the list; in the CLI use /model.
  • Send a message; a normal reply means it works.

✓ How to tell it worked

  • Chat answers with your model.
  • The Usage page shows the request.

FAQ

I get 404.

Per the official troubleshooting table, 404 means a wrong Base URL. Toggle between the with/without /chat/completions forms as described in step 2.

I get 401.

Invalid key: truncated, revoked, or you typed an environment variable name instead of the key.

A quota or model error?

Per the official table this is usually a wrong model name or a model you cannot use. Copy it again from the plaza.

The new model is not in the list.

Restart the CodeBuddy panel; with models.json make sure the id is in availableModels.

Related tutorials

Still stuck?

Read the troubleshooting tutorials first. If that does not help, open a ticket with the request_id, time, model and the exact error (never paste your key).