When to Use
WorkBuddy supports configuring custom models. You can integrate Tokener CA as an OpenAI-compatible model provider so WorkBuddy can use platform models for code understanding, editing, explanation, and Agent tasks.
You only need four values to integrate:
| Setting | Value |
|---|---|
| API Key | API key, for example tok-... |
| Endpoint | https://a.tokener.ca/v1/chat/completions |
| Model ID | Platform model name, for example glm-5.3:flash |
| Model capabilities | Choose text, tool calling, image, and other capabilities based on the model's actual abilities |
Option 1: Configure in the WorkBuddy UI
If your version of WorkBuddy offers a "custom model" or "custom provider" UI, we recommend using it first.
Fill in the values below:
| Field | Value |
|---|---|
| Provider name | Tokener CA |
| Model name | glm-5.3:flash, or the platform model ID you want to use |
| API Key | API key |
| Endpoint | https://a.tokener.ca/v1/chat/completions |
| Protocol type | OpenAI-compatible |
After saving, restart WorkBuddy or refresh the model list, then select the model you just added in the model picker.
Option 2: Use a Local Configuration File
If your version supports local JSON configuration, you can add a Tokener CA model at the user level or project level.
Common configuration locations:
| Scope | Windows | macOS / Linux |
|---|---|---|
| User level | C:\Users\<username>\.workbuddy\models.json | ~/.workbuddy/models.json |
| Project level | <project_root>\.workbuddy\models.json | <project_root>/.workbuddy/models.json |
Some WorkBuddy versions reuse the CodeBuddy configuration directory. If .workbuddy doesn't take effect, check for a sibling .codebuddy/models.json, or a .codebuddy/models.json in your user directory.
Example configuration:
{ "models": [ { "id": "glm-5.3:flash", "name": "Tokener CA GLM 5.3 Flash", "vendor": "Tokener CA", "url": "https://a.tokener.ca/v1/chat/completions", "apiKey": "${TOKENER_API_KEY}", "maxInputTokens": 1048576, "maxOutputTokens": 1048576, "supportsToolCall": true, "supportsImages": true } ], "availableModels": [ "glm-5.3:flash" ]}The limits shown are the featured model's; for another model, take its context window and max output from its page on /models.
supportsImages above matches the model in the sample. For another model, set it to true only if its page on /models lists image input; otherwise false.
Set Environment Variables
We recommend putting the API Key in an environment variable and having the configuration file only reference the variable.
Current PowerShell window:
$env:TOKENER_API_KEY="tok-..."Persist on Windows:
setx TOKENER_API_KEY "tok-..."macOS / Linux:
export TOKENER_API_KEY="tok-..."After setting it, reopen WorkBuddy to make sure it can read the new environment variable.
Verify the API
Before integrating with WorkBuddy, run a request with the same key and model to make sure it works:
curl -X POST "https://a.tokener.ca/v1/chat/completions" \ -H "Authorization: Bearer <consumer_api_key>" \ -H "Content-Type: application/json" \ --data-raw '{ "model": "glm-5.3:flash", "messages": [ { "role": "user", "content": "Return a short message confirming the integration works." } ], "max_tokens": 64, "stream": false }'If curl succeeds but WorkBuddy can't make the call, first check that WorkBuddy has the full endpoint filled in, not just https://a.tokener.ca/v1.
Troubleshooting Checklist
| Symptom | How to Fix |
|---|---|
| Model doesn't appear in the list | Check that availableModels includes the matching id, then save and restart WorkBuddy |
| Authentication fails | Check whether the environment variable is read by the WorkBuddy process, or temporarily fill in the key directly to verify |
404 | Check that the model ID comes from the Tokener CA model list |
| Wrong request URL | WorkBuddy's url usually needs the full /v1/chat/completions address |
| Tool calling misbehaves | First confirm whether the model is suitable for tool calling, then check the supportsToolCall setting |
