Skip to main content

WorkBuddy

Connect several custom models under a single API Key via a models.json config file.

Download: codebuddy.cn/work

CLI form and CodeBuddy IDE only

models.json custom models work only in WorkBuddy's CLI form and in CodeBuddy IDE. The extension build does not support them yet.

After installing, open and sign in once so it generates the config directory.

Before you start

You need an API Key with available quota. Copy model names from the model list — they are case-sensitive.

Windows one-click setup

Install and launch WorkBuddy once first, then use GSS Deploy (Windows one-click setup) to fetch available models and write configuration automatically. Windows only.

Where the config file goes​

EnvironmentPath
Windows%USERPROFILE%\.workbuddy\models.json
macOS~/.workbuddy/models.json
Per-project (that project only)<project>/.codebuddy/models.json
Linux cloud / sandbox~/.codebuddy/models.json (usually /root/.codebuddy/models.json)

Project-level takes precedence over user-level. Some builds read .codebuddy rather than .workbuddy, so placing a copy in both is the safest bet.

Distribution of the native Linux desktop client isn't confirmed yet — check the official download page.

Cloud sandboxes don't read local config

In cloud or sandbox environments where the working directory is /workspace, the config must be written to ~/.codebuddy/models.json inside the sandbox. Config on your local Windows or macOS machine is not synced there.

Opening the config directory:

  • Windows: Win+R → %USERPROFILE%\.workbuddy
  • macOS: press Cmd+Shift+G in Finder and enter ~/.workbuddy, or run mkdir -p ~/.workbuddy
  • Linux sandbox: mkdir -p ~/.codebuddy

Writing models.json​

The root must be an object

It must be { "models": [ ... ] } — not a bare array [ ... ], or WorkBuddy won't load it.

{
"models": [
{
"id": "deepseek-v4-pro",
"name": "deepseek-v4-pro",
"vendor": "Custom",
"url": "https://api.smartwan.com/v1/chat/completions",
"apiKey": "sk-your-token",
"supportsToolCall": true,
"supportsImages": false,
"supportsReasoning": false
},
{
"id": "kimi-k2.6",
"name": "kimi-k2.6",
"vendor": "Custom",
"url": "https://api.smartwan.com/v1/chat/completions",
"apiKey": "sk-your-token",
"supportsToolCall": true,
"supportsImages": false,
"supportsReasoning": false
},
{
"id": "claude-sonnet-5",
"name": "claude-sonnet-5",
"vendor": "Custom",
"url": "https://api.smartwan.com/v1/chat/completions",
"apiKey": "sk-your-token",
"supportsToolCall": true,
"supportsImages": true,
"supportsReasoning": false
}
]
}

To add a model, append another object in the same shape to the "models" array and change id and name — vendor, url and apiKey stay identical, since every model shares the same key.

JSON has no comments, so don't paste explanatory text into the file.

Field reference​

FieldMeaning
idThe model name sent to the API; must match Models
urlThe full endpoint path — must end in /chat/completions
apiKeyYour API Key, shared by all models
supportsToolCallWhether tool calling is supported; set per the model's real capability
supportsImagesWhether image input is supported
supportsReasoningWhether to surface the reasoning process

Set those last three according to what the model actually supports — getting them wrong causes call failures.

models.json contains a plaintext key

Don't commit it to Git, upload it to a public repository, or include it in screenshots. Remember to add project-level config to .gitignore.

Applying and verifying​

Config hot-reloads (roughly a 1-second debounce). If it doesn't refresh, press Ctrl+Shift+P → Developer: Reload Window, or quit and restart completely.

Open the model picker and search custom: — your custom models appear with a custom tag. Select one, send a message, and a reply means success.

Troubleshooting​

SymptomFix
Custom models missing from the pickerCheck the root is { "models": [...] }; confirm the directory is right; Reload Window after editing
Cloud projects can't see the configThe config must be written to ~/.codebuddy/models.json inside the sandbox
Calls return 404url must be the full path, ending in /chat/completions

Can I add image generation models? No. Models like gpt-image-2 only support /v1/images/generations, while WorkBuddy custom models only support /chat/completions — adding one will just fail at call time.