Models Hub
Agent Tools

WorkBuddy

The CodeBuddy IDE AI coding assistant — connect Models Hub's OpenAI-compatible models via a local models.json.

Edit this page

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:

LevelPathNotes
User~/.codebuddy/models.jsonApplies globally
Project<project-root>/.codebuddy/models.jsonProject-specific, takes precedence

The availableModels field 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

FieldRequiredDescription
idYesUnique model identifier; must match the model ID in the Models Hub console
nameYesDisplay name shown in the IDE
urlYesThe full Chat Completions endpoint, ending with /chat/completions
apiKeyYesThe actual API key value (not an environment variable name)
vendorYesProvider name; you can use Models Hub
maxInputTokens / maxOutputTokensNoMaximum input/output tokens for the model
supportsToolCallNoWhether tool/function calling is supported
supportsImagesNoWhether image input is supported
supportsReasoningNoWhether reasoning mode is supported
availableModelsNoRestricts 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 TypeScript

A normal response means the integration works. Custom models are automatically tagged custom for easy filtering in the UI.

❓ FAQ

ProblemSolution
New model doesn't appear in the pickerCheck that availableModels includes the model ID and that the config has reloaded
401 / invalid API keyMake sure apiKey is the actual key value, not an environment variable name
url must end with /chat/completionsMake sure url is the full endpoint, not just /v1
Model not foundMake sure id exactly matches the model ID in the Models Hub console
Project config not taking effectThe project-level models.json overrides the user level — check .codebuddy/models.json in the project root
Output is truncatedIncrease maxOutputTokens

On this page