WorkBuddy
The CodeBuddy IDE AI coding assistant — connect Models Hub's OpenAI-compatible models via a local models.json.
Introduction
WorkBuddy (CodeBuddy IDE) supports custom models through a local models.json file and is compatible with the OpenAI interface format, so it connects to Models Hub models seamlessly.
📦 Before you start
- WorkBuddy / CodeBuddy IDE installed
- Models Hub base URL:
https://modelsok.com/v1(the endpoint must use the full path, see below) - A valid Models Hub API key (generated in the console)
- The model name you want to use (e.g.
claude-sonnet-4-6,gemini-2.5-flash), which must exactly match the model ID in the Models Hub console
🗂️ Configuration file location
WorkBuddy manages custom models with a two-level models.json:
| Level | Path | Notes |
|---|---|---|
| User | ~/.codebuddy/models.json | Applies globally |
| Project | <project-root>/.codebuddy/models.json | Project-specific, takes precedence |
The
availableModelsfield in the project-level config completely overrides the user-level one.
🚀 Step 1: Edit models.json
Open (or create) the relevant models.json and add the Models Hub models:
{
"models": [
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6 (Models Hub)",
"vendor": "Models Hub",
"url": "https://modelsok.com/v1/chat/completions",
"apiKey": "ms_live_your_api_key",
"maxInputTokens": 200000,
"maxOutputTokens": 8192,
"supportsToolCall": true,
"supportsImages": true,
"supportsReasoning": true
},
{
"id": "gemini-2.5-flash",
"name": "Gemini 2.5 Flash (Models Hub)",
"vendor": "Models Hub",
"url": "https://modelsok.com/v1/chat/completions",
"apiKey": "ms_live_your_api_key",
"maxInputTokens": 1000000,
"maxOutputTokens": 8192,
"supportsToolCall": true,
"supportsImages": false
}
],
"availableModels": [
"claude-sonnet-4-6",
"gemini-2.5-flash"
]
}Field reference
| Field | Required | Description |
|---|---|---|
id | Yes | Unique model identifier; must match the model ID in the Models Hub console |
name | Yes | Display name shown in the IDE |
url | Yes | The full Chat Completions endpoint, ending with /chat/completions |
apiKey | Yes | The actual API key value (not an environment variable name) |
vendor | Yes | Provider name; you can use Models Hub |
maxInputTokens / maxOutputTokens | No | Maximum input/output tokens for the model |
supportsToolCall | No | Whether tool/function calling is supported |
supportsImages | No | Whether image input is supported |
supportsReasoning | No | Whether reasoning mode is supported |
availableModels | No | Restricts which models appear in the dropdown; show all if empty |
✅ Step 2: Verify
WorkBuddy auto-reloads about 1 second after the config changes (debounced) — no restart needed. Select the Models Hub model you just added (e.g. claude-sonnet-4-6) in the model picker and send a test message:
Write a quicksort implementation in TypeScriptA normal response means the integration works. Custom models are automatically tagged custom for easy filtering in the UI.
❓ FAQ
| Problem | Solution |
|---|---|
| New model doesn't appear in the picker | Check that availableModels includes the model ID and that the config has reloaded |
| 401 / invalid API key | Make sure apiKey is the actual key value, not an environment variable name |
url must end with /chat/completions | Make sure url is the full endpoint, not just /v1 |
| Model not found | Make sure id exactly matches the model ID in the Models Hub console |
| Project config not taking effect | The project-level models.json overrides the user level — check .codebuddy/models.json in the project root |
| Output is truncated | Increase maxOutputTokens |