docs: add Atomic Chat provider section (#23069)

This commit is contained in:
Mike
2026-04-28 23:10:41 -05:00
committed by GitHub
parent f6b4f54216
commit a8c74c04de
18 changed files with 684 additions and 0 deletions
@@ -295,6 +295,44 @@ OpenCode Zen 是由 OpenCode 团队提供的模型列表,这些模型已经过
---
### Atomic Chat
你可以通过 [Atomic Chat](https://atomic.chat) 配置 opencode 以使用本地模型。Atomic Chat 是一款桌面应用程序,它在 OpenAI 兼容的 API 服务器后面运行本地 LLM(默认端点 `http://127.0.0.1:1337/v1`)。
```json title="opencode.json" "atomic-chat" {5, 6, 8, 10-14}
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"atomic-chat": {
"npm": "@ai-sdk/openai-compatible",
"name": "Atomic Chat (local)",
"options": {
"baseURL": "http://127.0.0.1:1337/v1"
},
"models": {
"<your-model-id>": {
"name": "<your-model-name>"
}
}
}
}
}
```
在此示例中:
- `atomic-chat` 是自定义的提供商 ID。可以是任何你想要的字符串。
- `npm` 指定此提供商使用的包。这里使用 `@ai-sdk/openai-compatible` 来连接任何 OpenAI 兼容的 API。
- `name` 是提供商在界面中显示的名称。
- `options.baseURL` 是本地服务器的端点。根据你的 Atomic Chat 设置修改主机和端口。
- `models` 是模型 ID 到其显示名称的映射。每个 ID 必须与 `GET /v1/models` 返回的 `id` 匹配——运行 `curl http://127.0.0.1:1337/v1/models` 可列出 Atomic Chat 当前已加载的 ID。
:::tip
如果工具调用工作不佳,请选择一个对 tool calling 支持较好的已加载模型(例如 Qwen-Coder 或 DeepSeek-Coder 的变体)。
:::
---
### Azure OpenAI
:::note