WorkBuddy Integration
Point Tencent WorkBuddy at QCode.cc as a custom model: fill URL, API Key and model id in the UI, then call Claude, GPT and China-family models with one cr_ key
WorkBuddy Integration¶
WorkBuddy 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 (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 or Codex CLI.
This page covers one job: add QCode.cc as a WorkBuddy custom model, so the same cr_ key can call our in-stock Claude / GPT / GLM / Kimi / DeepSeek / Qwen models from WorkBuddy.
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.
Prerequisites¶
- WorkBuddy installed (site: codebuddy.cn/work; install steps: official Mac / Windows guides)
- A QCode.cc API Key (starts with
cr_) from the 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 andBASE_URLrules: Endpoints & API Formats
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.
- Start WorkBuddy → account menu (bottom left) → Settings
- Left nav: Model → under custom models, Add model
- Provider: Custom
- 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. claude-sonnet-5 |
Must be a live id on qcode.cc/models, character-for-character |
| Advanced | Enable tool calling / image / 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 — and let WorkBuddy append /chat/completions.
- Do not type
.../openai/v1/chat/completionswhile 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/completionsin 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.jsonand are not uploaded - Custom models previously added via
~/.codebuddy/models.jsonstill 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. 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 extracted from dev.qcode.cc/models on 2026-08-16 (positive control: the set contains claude-sonnet-5). Prices are the input / output rates per million tokens shown on that page at the time. Treat qcode.cc/models as live; admins can change the service fee.
| Model id | Snapshot price (in / out) | Context / output | Use |
|---|---|---|---|
claude-sonnet-5 |
$2.00 / $10.00 | 1M / 128K | Daily default. Current balanced tier |
claude-opus-5 |
$5.00 / $25.00 | 1M / 128K | Hard reasoning, long documents |
claude-sonnet-4-6 |
$3.00 / $15.00 | 1M / 64K | Previous-gen Sonnet, still on sale |
gpt-5.6-terra |
$2.00 / $12.00 | 400K / 128K | Everyday GPT tier |
glm-5.2 |
$1.40 / $4.40 | 200K / 131K | Zhipu flagship, common for Chinese office work |
kimi-k3 |
$3.00 / $15.00 | 1M / 131K | Moonshot flagship, long context |
deepseek-v4-pro |
$0.43 / $0.87 | 1M / 384K | DeepSeek flagship, among the lowest unit prices |
qwen3.7-max |
$2.50 / $7.50 | 1M / 131K | Qwen flagship |
Lighter siblings glm-5.1, kimi-k2.6, deepseek-v4-flash and qwen3.7-plus are also on sale. See Model Selection. Do not put a name that is missing from 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 §4):
KEY="cr_你的密钥"
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.qcode.cc/openai/v1/chat/completions \
-H "Authorization: Bearer $KEY"
# → 400 = 路径与密钥都通(缺请求体属预期);401 = 密钥无效;404 = 路径前缀错了
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¶
Fully quit WorkBuddy and reopen it (do not leave it in the tray). Official docs say the save persists; if it is still missing, open Settings → Model and confirm the custom row is still there.
HTTP 404¶
- Custom protocol off: endpoint is
https://api.qcode.cc/openai/v1— do not append/chat/completionsyourself - Custom protocol on: use the full
https://api.qcode.cc/openai/v1/chat/completions - No trailing
/ - 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. 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 QCode id such as claude-sonnet-5, not the display label "Claude Sonnet 5" and not another vendor's alias. Live list: qcode.cc/models or GET https://api.qcode.cc/v1/models with your key.
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 and Tencent's user agreement are authoritative. Requests that reach QCode can be inspected at 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. One QCode key, one quota — see Billing.
Next steps¶
- Endpoints & API Formats — three protocols, four domains,
BASE_URLmap - CC Switch Setup — switch the same key between Claude Code and Codex
- Model Selection — which tier to use day to day
- Billing — plans and quota
- Live ids and rates: qcode.cc/models
No QCode.cc API Key yet? Pick a plan at qcode.cc/pricing.