> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laozhang.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WorkBuddy setup with LaoZhang API

> Add LaoZhang API as a custom model in Tencent's WorkBuddy desktop agent and run GPT-6, GLM, Kimi, or Gemini models with tool calls, billed per token instead of WorkBuddy credits.

WorkBuddy is Tencent's AI office agent for Windows and macOS. Its built-in models run on WorkBuddy credits, while a custom model sends each request to LaoZhang API with your own key.

| Item | Details |
| - | - |
| Where | Settings → 「模型」 (Models) → 「添加模型」 (Add model) → provider 「自定义」 (Custom) |
| Endpoint | `https://api.laozhang.ai/v1/chat/completions` |
| 「自定义协议」 (custom protocol) | Unticked, the default |
| Token | `default` group, Usage first billing mode |
| Recommended models | `gpt-6.1-sol`, `glm-5.2`, `gemini-3.8-flash` |
| Billing | Per token on LaoZhang API; no WorkBuddy credits used |
| Last verified | November 4, 2026, WorkBuddy 5.9.3 (macOS) |

## Add a custom model

**1. Create a LaoZhang API token**

In [Tokens](https://api.laozhang.ai/token), create a token in the `default` group with the **Usage first** billing mode, then copy the key.

**2. Open model settings**

Sign in to WorkBuddy. From the menu bar, choose **WorkBuddy** → 「设置…」 (Settings), open 「模型」 (Models) in the sidebar, and click 「添加模型」 (Add model) next to 「自定义模型」 (Custom models). Custom models are added, edited, and deleted here, so you don't need to edit any config file.

**3. Choose Custom and fill in the connection**

In the 「供应商」 (Provider) dropdown, which notes it supports OpenAI-compatible APIs only, search for and pick 「自定义」 (Custom). Then fill in:

* 「接口地址」 (**Endpoint URL**): `https://api.laozhang.ai/v1/chat/completions`, up to and including `/chat/completions`
* **API Key**: your LaoZhang API key. 「测试连接」 (Test connection) checks it.
* 「模型名称」 (**Model name**): the exact model ID, such as `gpt-6.1-sol` or `glm-5.2`

Model IDs must match the [model catalog](https://docs.laozhang.ai/en/models.md) exactly. Each entry holds one model; add more the same way.

**4. Leave custom protocol unticked**

Under 「高级配置」 (Advanced), leave the 「自定义协议」 (custom protocol) box unticked. Unticked, WorkBuddy calls the standard `/chat/completions` path and checks the endpoint address for you; ticked, it sends requests to the typed address as is.

**5. Tick the model's capabilities**

In the same 「高级配置」 (Advanced) section, tick only what the model actually supports:

* 「工具调用」 (**Tool calling**): ticked by default. Keep it on for every model in [Choose a model](#choose-a-model); WorkBuddy needs it to run tasks with tools.
* 「图片输入」 (**Image input**): tick it only if the model accepts images.
* 「思考模式」 (**Thinking mode**): tick it only if the model is a reasoning model.

When you're unsure, tick fewer. The 「输入」 (Input) and 「输出」 (Output) fields set the context and output limits; leave them empty to use the defaults. Then click 「保存」 (Save).

**6. Save and run a test task**

Save the model and select it in the model picker. Send a short message first, then a small task that makes WorkBuddy use one of its tools. If both finish, chat and tool calls work.

Each request then appears in [call logs](https://api.laozhang.ai/log) with its model and token usage.

WorkBuddy saves custom model settings, including the API key, only on your computer, in `~/.workbuddy/models.json`. Settings from older versions in `~/.codebuddy/models.json` still work. Keep this file out of shared folders and screenshots.

## Choose a model

These models handle multi-turn tool calls through Chat Completions on LaoZhang API:

| Model | Use it for |
| - | - |
| `gpt-6.1-sol` | General work and writing; first choice for an OpenAI model |
| `glm-5.2` | Agent tasks and coding |
| `kimi-k3` | Everyday office work |
| `gemini-3.8-flash` | Fast, low-cost tasks you run often |

`gpt-6-sol` and `gpt-5.6-sol` call tools as well.

**Don't use Claude or DeepSeek models in WorkBuddy for now.** WorkBuddy only speaks the OpenAI-compatible protocol, and these models can return a 400 when a multi-step task calls tools turn after turn. For Claude, use a tool that supports the Anthropic format, such as [Claude Code](https://docs.laozhang.ai/en/scenarios/programming/claude-code.md). Prices are in the [model catalog](https://docs.laozhang.ai/en/models.md).

## FAQ

### The model is grayed out, or I get error 4100

WorkBuddy grays out a custom model that has no endpoint URL or API key, and requests to it fail with error 4100. Open the model in 「模型」 (Models), fill in both fields, and save.

### GPT-6 returns "Function tools with reasoning\_effort are not supported"

Before November 4, 2026, GPT-6 models couldn't call tools with reasoning on in Chat Completions, so WorkBuddy tasks with tools failed with this error. LaoZhang API now handles these requests, and `gpt-6.1-sol` and `gpt-6-sol` call tools in WorkBuddy with no extra settings.

If you still see the error, check that the endpoint is `https://api.laozhang.ai/v1/chat/completions`, then send support the time of the error and the model.

### Should I tick custom protocol?

No. It's meant for gateways that use a non-standard path. LaoZhang API uses the standard `/chat/completions` path, so leave it unticked and enter the full endpoint `https://api.laozhang.ai/v1/chat/completions`.

### I get a 401, 403, 404, or 503

* **401**: the key is wrong or wasn't copied in full. Copy it again from [Tokens](https://api.laozhang.ai/token) and check that the token is enabled. See [Invalid API key or 404](https://docs.laozhang.ai/en/faq/invalid-api-key.md).
* **403 or 503 "no available channels"**: the token's group doesn't include the model, or the model ID is misspelled. See [Check model availability and access](https://docs.laozhang.ai/en/faq/model-availability.md).
* **404**: the endpoint has `/v1` twice or not at all. Use `https://api.laozhang.ai/v1/chat/completions`.

If the error mentions insufficient balance, see [why a request can fail on balance](https://docs.laozhang.ai/en/faq/balance-insufficient.md).

### Does a custom model use my WorkBuddy credits?

No. WorkBuddy doesn't charge credits for custom models. LaoZhang API bills each request per token from your account balance, and [call logs](https://api.laozhang.ai/log) show each request's token usage.

## Related pages

* [Integrations overview](https://docs.laozhang.ai/en/scenarios.md)
* [OpenAI protocol: Chat Completions](https://docs.laozhang.ai/en/api-reference/chat-completions.md)
* [Check model availability and access](https://docs.laozhang.ai/en/faq/model-availability.md)
* [WorkBuddy docs](https://www.workbuddy.cn/docs/workbuddy/Overview)
* [WorkBuddy downloads and version history](https://www.workbuddy.cn/docs/workbuddy/Download-History)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.