# WorkBuddy Integration

> **Last verified**: 2026-09-18 · 📄 Per official docs (WorkBuddy 5.5.6 (official site, checked 2026-09; Windows 10+ / macOS 12+, no Linux desktop package))

## At a glance

| Item | Details |
|---|---|
| Models you can use | Claude ❌ (custom models speak OpenAI Chat Completions only) · GPT ✅ · Chinese models ✅ · Gemini ❌ |
| Protocol & Base URL | OpenAI Chat: endpoint `https://api.qcode.cc/openai/v1` |
| Where to configure | in-app: Settings → Models → custom model (Advanced tools section) |
| Official docs | [codebuddy.cn/work](https://www.codebuddy.cn/work/) |

[WorkBuddy](https://www.codebuddy.cn/work/) is Tencent Cloud's desktop AI agent. It is aimed at office deliverables (notes, sheets, decks, light code) and sits in the same family as [CodeBuddy](https://www.codebuddy.cn/docs) (the IDE / CLI coding assistant). It is **not** a drop-in replacement for Claude Code: repo-scale refactors, tests and CI still belong in [Claude Code](/docs/getting-started/installation) or [Codex CLI](/docs/ide/codex).

This page covers one job: add QCode.cc as a WorkBuddy **custom model**, so the same `cr_` key can call our in-stock GPT / GLM / Kimi / DeepSeek / Qwen models from WorkBuddy.

> **🔴 WorkBuddy cannot use Claude models.** WorkBuddy's custom models speak only the
> **OpenAI Chat Completions** protocol, and QCode's OpenAI leg **does not accept Claude models**
> (a `claude-…` id returns `model_not_available_on_endpoint`). So **GPT and the four Chinese
> families work fine** in WorkBuddy, but Claude does not. For Claude, use a client that speaks the
> Anthropic protocol — [Claude Code](/docs/getting-started/installation),
> [Cline](/docs/ide/cline), [Zed](/docs/ide/zed). See
> [Endpoints & API Paths](/docs/getting-started/endpoints-and-api-paths).

QCode.cc is not affiliated with Tencent, WorkBuddy or CodeBuddy. UI labels follow the WorkBuddy build you installed; field meanings follow the [official model configuration](https://www.codebuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Function-Description/Model).

## Prerequisites

- WorkBuddy installed (site: [codebuddy.cn/work](https://www.codebuddy.cn/work/); install steps: official [Mac](https://www.codebuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Installation-Mac-Guide) / [Windows](https://www.codebuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Installation-Win-Guide) guides)
- A QCode.cc API Key (starts with `cr_`) from the [dashboard](https://qcode.cc/dashboard)
- The same key works on all three protocols. WorkBuddy custom models use **OpenAI Chat Completions**, which maps to QCode `/openai/v1/chat/completions`. Protocol and `BASE_URL` rules: [Endpoints & API Formats](/docs/getting-started/endpoints-and-api-paths)

## Add QCode in the UI (recommended)

The official model page says custom models should be added in Settings, **without hand-editing a config file**. Tencent Cloud TokenHub's WorkBuddy guide uses the same path.

1. Start WorkBuddy → account menu (bottom left) → **Settings**
2. Left nav: **Model** → under custom models, **Add model**
3. Provider: **Custom**
4. Fill the table below, save, then pick the new model in the chat model picker

| Field | Value | Notes |
|-------|--------|------|
| Provider | `Custom` | Do not pick a built-in Tencent Cloud Token Plan |
| Endpoint URL | `https://api.qcode.cc/openai/v1` | Mainland China: prefer `https://asia.qcode.cc/openai/v1` |
| API Key | Your QCode.cc key (`cr_` prefix) | No leading/trailing spaces |
| Model name | e.g. `gpt-5.5` | Must be a live id on [qcode.cc/models](https://qcode.cc/models), character-for-character |
| Advanced tools | Enable tool calling / image input / reasoning as needed | Suggested in the TokenHub official example; not required |

You can add several custom rows with the same URL and key, changing only **Model name** — e.g. one `glm-5.2` and one `deepseek-v4-pro`.

### How to fill the URL (custom protocol)

Official behaviour of the **custom protocol** toggle:

| Toggle | Behaviour |
|--------|-----------|
| Off (default) | Use the standard `/chat/completions` path; validate and complete the URL |
| On | Send the URL **exactly as typed**; skip validation and auto-complete |

So with the default (off), stop at `/openai/v1` — the same value as `OPENAI_BASE_URL` in [Environment Variables](/docs/getting-started/environment) — and let WorkBuddy append `/chat/completions`.

- **Do not** type `.../openai/v1/chat/completions` while custom protocol is off; the path may be appended twice and return 404
- If the default completion fails, follow the TokenHub official example: put the full URL `https://api.qcode.cc/openai/v1/chat/completions` in the field and **turn custom protocol on**
- **No trailing `/`**. Extra slashes become `//chat/completions`

The four access domains are functionally identical; only routing differs. The same key works on all of them:

| Node | Endpoint URL (custom protocol off) |
|------|-------------------------------------|
| Global (Route 53) | `https://api.qcode.cc/openai/v1` |
| Asia (recommended in CN) | `https://asia.qcode.cc/openai/v1` |
| US | `https://us.qcode.cc/openai/v1` |
| EU | `https://eu.qcode.cc/openai/v1` |

### Where the config lives

Official statements:

- Parameters (including the API Key) are stored only in the local `workbuddy/models.json` and are **not uploaded**
- Custom models previously added via `~/.codebuddy/models.json` still work after the UI upgrade and can be viewed / edited / deleted in the UI
- Token cost of custom models is paid to the third party (here, QCode.cc), not deducted from WorkBuddy built-in credits

This page **does not** ship a hand-written `models.json` schema. The official path is the UI; field names follow your installed build and the [official model configuration](https://www.codebuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Function-Description/Model). If you need a batch edit, add one row in the UI first and inspect the local file — do not copy a schema from a third-party blog.

## Models to add first

All ids below were cross-checked on 2026-09-18 on both [qcode.cc/models](https://qcode.cc/models) and `GET https://api.qcode.cc/api/v1/models`. Rates are not copied onto this page — **treat qcode.cc/models as live** (admins can change the service fee).

| Model id | Use |
|----------|-----|
| `gpt-5.6-terra`  Everyday GPT tier |
| `glm-5.2`  Zhipu flagship, common for Chinese office work |
| `kimi-k3`  Moonshot flagship, long context |
| `deepseek-v4-pro`  DeepSeek flagship, among the lowest unit prices |
| `qwen3.8-max` | Qwen flagship |

Lighter siblings `glm-5.3-flash`, `deepseek-v4-flash`, `deepseek-v4.1-flash`, `qwen3.8-flash` and `qwen3.7-plus` are all on sale; the previous-generation `glm-5.1` and `kimi-k2.6` have been retired — entering them will fail. See [Model Selection](/docs/usage/model-selection). Do not put a name that is missing from [qcode.cc/models](https://qcode.cc/models) into **Model name**.

This path is OpenAI Chat Completions. **Do not** put `ANTHROPIC_BASE_URL` (`https://api.qcode.cc/api`) in the endpoint field — that prefix is for Claude Code / the Anthropic SDK.

## Verify

First check that QCode's OpenAI path is reachable on your network (same probe as [Endpoints & API Formats](/docs/getting-started/endpoints-and-api-paths) §4):

```bash
KEY="cr_your_key"

curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.qcode.cc/openai/v1/chat/completions \
  -H "Authorization: Bearer $KEY"
# → 400 = path and key both work (empty body is expected); 401 = bad key; 404 = wrong path prefix
```

In mainland China, repeat with host `asia.qcode.cc`. Then in WorkBuddy pick the new model and send `ping`. A reply means the integration works.

If the path probe succeeds but WorkBuddy still errors, re-check the previous section: extra `/chat/completions` or a trailing slash, custom-protocol toggle vs how you typed the URL, and a character-exact model id.

## FAQ

### The model picker does not show the new row

Since v5.1.1 the official docs describe hot-reloading of model config — normally saving is enough. If the picker still misses it, fully quit WorkBuddy (do not leave it in the tray) and reopen; then check Settings → Model for the row.

### HTTP 404

1. Custom protocol **off**: endpoint is `https://api.qcode.cc/openai/v1` — do not append `/chat/completions` yourself
2. Custom protocol **on**: use the full `https://api.qcode.cc/openai/v1/chat/completions`
3. No trailing `/`
4. Do not use `https://api.qcode.cc/api` (Anthropic Messages prefix)

### HTTP 401

The key must start with `cr_` and have no spaces. Confirm it at [qcode.cc/dashboard](https://qcode.cc/dashboard). WorkBuddy stores the key locally; rotating the key means editing this custom-model row.

### Odd or failed replies after filling the model name

**Model name** must be a live id on this endpoint such as `gpt-5.6-terra`, not the display label "GPT 5.6 Terra" and not another vendor's alias. Live list: [qcode.cc/models](https://qcode.cc/models) or `GET https://api.qcode.cc/openai/v1/models` with your key — **that list is the set WorkBuddy can use**, and it contains no Claude.

### Does WorkBuddy upload the chat to Tencent?

Official wording: in the custom-model path WorkBuddy is a transport; it forwards input to the third party you configured, and the API Key stays local. The [official model page](https://www.codebuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Function-Description/Model) and Tencent's user agreement are authoritative. Requests that reach QCode can be inspected at [probe.qcode.cc](https://probe.qcode.cc) with the same key.

### Can WorkBuddy replace Claude Code?

No. WorkBuddy is built for multi-agent office delivery; Claude Code / Codex are built for in-repo coding loops. Use both: office artifacts in WorkBuddy, code changes in Claude Code switched via [CC Switch](/docs/ide/cc-switch). One QCode key, one quota — see [Billing](/docs/reference/billing).

## Next steps

- [Endpoints & API Formats](/docs/getting-started/endpoints-and-api-paths) — three protocols, four domains, `BASE_URL` map
- [CC Switch Setup](/docs/ide/cc-switch) — switch the same key between Claude Code and Codex
- [Model Selection](/docs/usage/model-selection) — which tier to use day to day
- [Billing](/docs/reference/billing) — plans and quota
- Live ids and rates: [qcode.cc/models](https://qcode.cc/models)

> No QCode.cc API Key yet? Pick a plan at [qcode.cc/pricing](https://qcode.cc/pricing).