summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/content/docs/zh-cn
diff options
context:
space:
mode:
authorxinxin <[email protected]>2026-03-11 23:35:16 +0800
committerGitHub <[email protected]>2026-03-11 10:35:16 -0500
commit9c585bb58ba98826cd5f7bf596cb65f411d378a4 (patch)
treee9221c5648ab74a52b19b5bfa4a9d55cabf7db30 /packages/web/src/content/docs/zh-cn
parent0f6bc8ae71d18645212cb954bd210f047b5416d8 (diff)
downloadopencode-9c585bb58ba98826cd5f7bf596cb65f411d378a4.tar.gz
opencode-9c585bb58ba98826cd5f7bf596cb65f411d378a4.zip
docs(providers): clarify npm choice for chat vs responses APIs (#16974)
Co-authored-by: wangxinxin <[email protected]>
Diffstat (limited to 'packages/web/src/content/docs/zh-cn')
-rw-r--r--packages/web/src/content/docs/zh-cn/providers.mdx4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/web/src/content/docs/zh-cn/providers.mdx b/packages/web/src/content/docs/zh-cn/providers.mdx
index 9c1616876..571b73024 100644
--- a/packages/web/src/content/docs/zh-cn/providers.mdx
+++ b/packages/web/src/content/docs/zh-cn/providers.mdx
@@ -1845,7 +1845,7 @@ Vercel AI Gateway 允许你通过统一端点访问来自 OpenAI、Anthropic、G
```
以下是配置选项说明:
- - **npm**:要使用的 AI SDK 包,对于 OpenAI 兼容的提供商使用 `@ai-sdk/openai-compatible`
+ - **npm**:要使用的 AI SDK 包,对于 OpenAI 兼容的提供商使用 `@ai-sdk/openai-compatible`(适用于 `/v1/chat/completions`)。如果你的提供商/模型走 `/v1/responses`,请使用 `@ai-sdk/openai`。
- **name**:在 UI 中显示的名称。
- **models**:可用模型。
- **options.baseURL**:API 端点 URL。
@@ -1911,5 +1911,5 @@ Vercel AI Gateway 允许你通过统一端点访问来自 OpenAI、Anthropic、G
2. 对于自定义提供商,请检查 OpenCode 配置并确认:
- `/connect` 命令中使用的提供商 ID 与 OpenCode 配置中的 ID 一致。
- - 使用了正确的 npm 包。例如,Cerebras 应使用 `@ai-sdk/cerebras`。对于其他所有 OpenAI 兼容的提供商,使用 `@ai-sdk/openai-compatible`。
+ - 使用了正确的 npm 包。例如,Cerebras 应使用 `@ai-sdk/cerebras`。对于其他所有 OpenAI 兼容的提供商,使用 `@ai-sdk/openai-compatible`(`/v1/chat/completions`);如果模型走 `/v1/responses`,请使用 `@ai-sdk/openai`。同一 provider 混用时,可在模型下设置 `provider.npm` 覆盖默认值。
- `options.baseURL` 字段中的 API 端点地址正确。