# Connect WorkBuddy to WanAPIs

> WorkBuddy supports any OpenAI-compatible custom model. Point it at WanAPIs and switch between GPT, Claude, Gemini, DeepSeek, GLM and Qwen with one key — pay per token, no subscription. Covers UI setup, models.json configuration and a full troubleshooting checklist.

Web page: https://wanapi.ai/docs/workbuddy

WorkBuddy is a desktop AI agent from Tencent Cloud's CodeBuddy team. It understands natural-language instructions, breaks tasks down on its own and works directly on your local files — batch-organizing files, producing documents, spreadsheets and slides, running data analysis. Besides its built-in models it supports custom models, as long as they speak the OpenAI-compatible protocol. Point it at WanAPIs and you can switch between vendors under one key, paying per token instead of subscribing to each. This guide goes from "should I connect my own API?" to "it doesn't work — what do I check?".

## Setup steps

### 1. First decide: built-in models or your own API

WorkBuddy's built-in models work out of the box with no setup and suit light use; their quota is consumed by WorkBuddy's own rules, runs out and must be topped up separately, and the model choice is fixed. Your own API is the other route: GPT, Claude, Gemini, DeepSeek, GLM and Qwen under one key, billed on actual tokens with no subscription, and you can match the model to the task — cheap models for simple batch work, flagships for the hard stuff. On repetitive batch jobs that price difference multiplies. If you already have an API elsewhere, or WorkBuddy processes dozens or hundreds of files a day for you, your own API is the better deal.

### 2. Get an API key

Create an account in the WanAPIs console and generate an API key starting with sk-. We recommend a dedicated key for WorkBuddy — the console breaks down logs and usage per key, so you can see exactly what the agent on this machine is costing you.

### 3. Add a custom model in the UI (recommended)

Click your avatar in the bottom-left → Settings → Models → Add model. The "Edit model" dialog states at the top that only OpenAI-compatible APIs are supported — which is exactly why WanAPIs plugs straight in. Set the provider to Custom, enter the FULL endpoint path ending in /chat/completions (with no stray slashes), then the API key and model name. Double-check that no trailing space got pasted after the key — it's the most common slip. The screenshot below shows a complete setup using gpt-6-astra.

**Avatar (bottom-left) → Settings → Models → Add model**

```
Provider:   Custom
Endpoint:   https://api.wanapis.com/v1/chat/completions
API Key:    sk-xxx
Model name: gpt-6-astra
```

![WorkBuddy Edit model dialog: provider set to Custom, endpoint pointing at WanAPIs, model name gpt-6-astra, with the advanced settings and reasoning effort options](https://wanapi.ai/docs/workbuddy-add-model.png)

*A complete setup using gpt-6-astra (set the input/output limits to the model's real capabilities). The WorkBuddy UI in the screenshot is in Chinese.*

### 4. The six "Advanced" switches aren't auto-detected for custom models

With a standard provider the capability flags are filled in automatically; with Custom, none are — tick them yourself to match what the model can actually do. 1) Tool calling: WorkBuddy relies on it (function calling) to read and write your files; without it the agent can only chat, not act — ALWAYS tick it. 2) Image input: tick only if the model can see images. 3) Reasoning mode: tick it for reasoning models such as gpt-6-astra and gpt-5.6-sol; only then do "default reasoning effort" and "supported reasoning efforts" (low / medium / high / extra high / max) matter — tick the levels the model supports. 4) Thinking-only mode: usually leave it off. 5) Allow disabling thinking: lets you turn reasoning off mid-conversation to save money. 6) Custom protocol: only needed when your endpoint does NOT end in /chat/completions — not needed for WanAPIs. Set the input/output limits at the bottom to the model's real context. Conversely, ticking a capability the model doesn't have makes requests fail — if unsure, tick only tool calling, get it working, then add the rest one at a time.

### 5. Configuring via file (optional — mind the version differences)

You can also write the config file directly: user-level ~/.codebuddy/models.json (on Windows C:\Users\<username>\.codebuddy\models.json), or a project-level file of the same name in the workspace, which takes precedence; newer versions use a workbuddy directory instead. ⚠️ One catch: many tutorials still present editing the file as the only way, but Tencent has stated that models configured in ~/.codebuddy/models.json keep working after the UI update and can be viewed, edited and deleted directly in the UI. So prefer the UI method above and only touch the file for bulk setups or older versions. Back it up first, save it as UTF-8 without BOM, and validate the JSON in your editor — if your editor complains, WorkBuddy most likely can't read it either.

**~/.codebuddy/models.json**

```
{
  "id": "gpt-5.6-sol",
  "name": "GPT-5.6 Sol (WanAPIs)",
  "vendor": "WanAPIs",
  "url": "https://api.wanapis.com/v1/chat/completions",
  "apiKey": "sk-xxx",
  "supportsToolCall": true,
  "supportsImages": false
}
```

### 6. Pick the model by task type (with real prices)

Most WorkBuddy work is "read a batch of files → think → write back": long input, short output. Across real non-streaming calls on WanAPIs, requests like these have a median of about 4,390 input tokens and under 198 output tokens — so the INPUT price is what drives cost, not the output price. On that basis one such task costs about $0.004 on glm-5.3-flash and about $0.028 on gpt-5.6-sol, meaning $1 covers roughly 246 or 36 runs. The budget tier is plenty for everyday batch work; save flagships for complex breakdowns. Use the model name exactly as listed in the marketplace.

**Unit prices ($ per 1M tokens, input / output)**

```
glm-5.3-flash      0.80 /  2.80   batch rewrites, formatting
qwen3.8-flash      0.80 /  2.70   same, and can read images
deepseek-v4-pro    3.00 / 20.00   strong reasoning, good value
claude-opus-5      5.00 / 25.00   most reliable on long task chains
gpt-5.6-sol        5.00 / 30.00   all-round workhorse
gpt-6-astra       10.00 / 50.00   latest flagship

# glm-5.3-flash and qwen3.8-flash are offered in a discounted group,
# the rest in the default group; see the pricing page for your key's group.
```

### 7. Test with a small task before going big

Don't throw a pile of work at it straight away. Start with something small, like "read the first 5 lines of every csv in this folder and summarize them in one table". That checks three things at once: the endpoint works, tool calling is really enabled, and billing looks right. Afterwards, the Usage Logs page in the WanAPIs console shows how many tokens it used, which route it took and what it cost. The screenshot below shows the result once configured — the chat replies normally, and the current model gpt-6-astra is shown at the bottom-right of the input box and under each reply.

![WorkBuddy chat window: gpt-6-astra replying normally through WanAPIs, with the current model shown at the bottom-right of the input box](https://wanapi.ai/docs/workbuddy-chat-ok.png)

*Working setup: replies come back normally and the current model shows as gpt-6-astra.*

### 8. Not working? Check in this order

1) Is the endpoint the full path ending in /chat/completions, with no stray slashes? If your endpoint genuinely ends differently, turn on "Custom protocol" so it skips path validation and auto-completion. 2) Was the API key copied in full, with no trailing space? 3) Does the model name exactly match the marketplace? It's case-sensitive. 4) If it can chat but won't touch files, tool calling isn't ticked. 5) If editing models.json does nothing, first make sure the client is recent enough (old versions may not read local config at all), then check the file path, BOM and JSON syntax. 6) If all of that is right, look for the request on the WanAPIs console's Usage Logs page: if it's there, the request reached the gateway and the error reason will tell you what's wrong; if there's no record at all, the problem is still on the client side.

## FAQ

### Can WorkBuddy use my own API?

Yes. WorkBuddy can connect any third-party model that speaks the OpenAI-compatible protocol, for both chat and agent workflows. Use "Configure custom model" at the bottom of the model picker, or Settings → Models → Add model, and choose Custom as the provider; you can also write a models.json config file.

### How do I set up a third-party model in WorkBuddy?

Three steps: 1) get an API key starting with sk- from your provider; 2) add a custom model in WorkBuddy with the endpoint (full path ending in /chat/completions), key and model name; 3) tick "Tool calling" manually. For WanAPIs the endpoint is https://api.wanapis.com/v1/chat/completions.

### Does the endpoint need to include /chat/completions?

Yes. WorkBuddy expects the /chat/completions path by default, and entering only the domain fails. The correct value is https://api.wanapis.com/v1/chat/completions — don't drop the ending and don't add stray slashes. If your provider's endpoint genuinely ends differently, turn on "Custom protocol" to skip path validation and auto-completion.

### My custom model doesn't work / produces no output?

Check in this order: is the endpoint complete with no stray slashes → is there a trailing space after the API key → does the model name exactly match the provider's docs (case-sensitive) → is "Tool calling" ticked. If all are right, look for the request in your provider's console logs: if it's there, read the error reason; if there's no record, the request never left the client and the problem is in the client config.

### Where is models.json?

User-level: ~/.codebuddy/models.json (on Windows C:\Users\<username>\.codebuddy\models.json). Project-level: a file of the same name in the workspace, which takes precedence over user-level. Newer versions use a workbuddy directory instead. That said, Tencent has stated that models configured at the old path keep working after upgrading and can be viewed and edited in the UI, so you usually don't need to edit the file by hand.

### I edited models.json and nothing changed?

Check four things: 1) old client versions may not read local config at all — upgrade first; 2) is the path right (user-level vs project-level); 3) the file must be UTF-8 without BOM — a BOM makes it unreadable; 4) validate the JSON in your editor first — if your editor flags an error, WorkBuddy can't read it either. Back up before editing.

### Does WorkBuddy support Claude's native protocol?

Custom models only support the OpenAI-compatible protocol, not Anthropic's native one. But WanAPIs already exposes the Claude family in OpenAI-compatible format, so entering claude-opus-5 as the model name just works — one of the perks of a gateway: it smooths over protocol differences for you.

### Tasks stop halfway / it won't operate on my files?

Nine times out of ten the "Tool calling" flag isn't ticked. With a Custom provider WorkBuddy doesn't auto-detect capabilities, so you must tick it by hand. It uses tool calling to read and write local files; without it, it can only chat. Also make sure the model you picked supports function calling.

### I ticked image input and now it errors?

Untick it. Enabling a capability the model doesn't actually have makes requests fail. If unsure, tick only "Tool calling", get the flow working, then try other capabilities one by one.

### Built-in models or a third-party API — which is better value?

For light use the built-in models are fine and need no setup. But their quota must be topped up separately once used, and the model choice is fixed; your own API is pay-per-token with no subscription, and you can match the model to the task — cheap models for simple batch work, flagships for hard problems. If you process dozens or hundreds of files a day, that difference multiplies.

### Which model is the best value for office tasks?

These tasks have long input and short output (real distribution on WanAPIs: median input about 4,390 tokens, output under 198), so look at the input price. glm-5.3-flash and qwen3.8-flash cost $0.80 per 1M input tokens, gpt-5.6-sol $5 and gpt-6-astra $10. Per task that's about $0.004 on the budget tier and about $0.028 on the workhorse — $1 covers roughly 246 or 36 runs. The budget tier is plenty for batch file work.

### Do I need separate accounts with each model vendor?

No. One WanAPIs key covers GPT, Claude, Gemini, DeepSeek, GLM, Qwen and more, billed per token from a single balance.

### Can one key be shared between WorkBuddy and other tools?

It can, but we recommend separate keys. The console splits logs and usage by key, so you can see exactly what WorkBuddy spends versus your other tools, and troubleshooting one won't get tangled up with the other.

### Which models are supported?

Mainstream text models — GPT, Claude, Gemini, DeepSeek, Kimi, Qwen, GLM, Grok and more. See the model marketplace for the full list. WorkBuddy is an agent, so pick a model that supports tool calling; a model without function calling can't operate on files even if connected.

---

Generated by the WanAPIs website and kept in sync with the web page. All guides in Markdown: https://wanapi.ai/docs/index.md
