WorkBuddy
Connect several custom models under a single API Key via a models.json config file.
Download: codebuddy.cn/work
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.
You need an API Key with available quota. Copy model names from the model list — they are case-sensitive.
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
| Environment | Path |
|---|---|
| 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.
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+Gin Finder and enter~/.workbuddy, or runmkdir -p ~/.workbuddy - Linux sandbox:
mkdir -p ~/.codebuddy
Writing models.json
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
| Field | Meaning |
|---|---|
id | The model name sent to the API; must match Models |
url | The full endpoint path — must end in /chat/completions |
apiKey | Your API Key, shared by all models |
supportsToolCall | Whether tool calling is supported; set per the model's real capability |
supportsImages | Whether image input is supported |
supportsReasoning | Whether to surface the reasoning process |
Set those last three according to what the model actually supports — getting them wrong causes call failures.
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
| Symptom | Fix |
|---|---|
| Custom models missing from the picker | Check the root is { "models": [...] }; confirm the directory is right; Reload Window after editing |
| Cloud projects can't see the config | The config must be written to ~/.codebuddy/models.json inside the sandbox |
| Calls return 404 | url 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.