fix(web): offer DeepSeek web tools whenever a credential exists
The DeepSeek search and Search/Fetch API providers now report readiness from credential presence alone, on any model route: the account token first on the deepseek-account route, then a literal apiKey or a configured apiKeyEnv reference. A conversation on another provider's model keeps web_search and web_fetch while a DeepSeek key is configured, as on master, so the route refusal WEB_PROVIDER_ROUTE_DISABLED and its upgrade guide are removed. The pi-ai-conversation-updates and deepseek-messages-system-prompt snapshots replay their master recordings again, the headless keyless smoke points its search key reference at an unset variable, and the readiness Agent Note records the rejected route and endpoint rules.
This commit is contained in:
1 parent
a19aabc8ba
commit
fb378dacf2
34 files changed
+171
-2198
No files matched your search
@@ -4454,7 +4454,7 @@ export interface Config {
|
||||
|
||||
- `inject`: `web`
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/web/web-deepseek-api/src/index.ts:37`](../packages/web/web-deepseek-api/src/index.ts)
|
||||
- `source`: [`packages/web/web-deepseek-api/src/index.ts:36`](../packages/web/web-deepseek-api/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Settings read by the next search or fetch without re-registering either provider. */
|
||||
@@ -4505,7 +4505,7 @@ export interface Config {
|
||||
|
||||
- `inject`: `web`
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/web/web-search-deepseek/src/index.ts:52`](../packages/web/web-search-deepseek/src/index.ts)
|
||||
- `source`: [`packages/web/web-search-deepseek/src/index.ts:51`](../packages/web/web-search-deepseek/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Plugin config (all optional — `apply` fills env-var and constant defaults). */
|
||||
|
||||
@@ -4456,7 +4456,7 @@ export interface Config {
|
||||
|
||||
- `inject`: `web`
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/web/web-deepseek-api/src/index.ts:37`](../packages/web/web-deepseek-api/src/index.ts)
|
||||
- `source`: [`packages/web/web-deepseek-api/src/index.ts:36`](../packages/web/web-deepseek-api/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Settings read by the next search or fetch without re-registering either provider. */
|
||||
@@ -4507,7 +4507,7 @@ export interface Config {
|
||||
|
||||
- `inject`: `web`
|
||||
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
|
||||
- `source`: [`packages/web/web-search-deepseek/src/index.ts:52`](../packages/web/web-search-deepseek/src/index.ts)
|
||||
- `source`: [`packages/web/web-search-deepseek/src/index.ts:51`](../packages/web/web-search-deepseek/src/index.ts)
|
||||
|
||||
```ts config-catalog
|
||||
/** Plugin config (all optional — `apply` fills env-var and constant defaults). */
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.1-rc.2/deepseek-web-tools-deepseek-routes/guide.md
|
||||
/:
|
||||
en: 3030d7c215cc474d
|
||||
zh: a7ab11e0e5a90f50
|
||||
/deepseek-web-tools-need-their-own-key-for-other-models:
|
||||
en: 9f5b7fb284c410c6
|
||||
zh: 936efc232a8f6458
|
||||
/deepseek-web-tools-need-their-own-key-for-other-models/change:
|
||||
en: 2296abaf2a9bd3cd
|
||||
zh: 27b22f4bfdd813d6
|
||||
/deepseek-web-tools-need-their-own-key-for-other-models/migration:
|
||||
en: 70921547e40b5730
|
||||
zh: b9cf59590bf39a9e
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "DeepSeek web search and the DeepSeek Search and Fetch APIs serve conversations on other providers' models only with a key of their own."
|
||||
---
|
||||
# DeepSeek web tools need their own key for other models
|
||||
|
||||
English | [中文](guide.zh.md)
|
||||
|
||||
## Change
|
||||
|
||||
`@deepseek-ai/dsh-web-search-deepseek` used to offer `web_search` to every conversation and search with `DEEPSEEK_API_KEY` whatever model the conversation used. It and the Search and Fetch APIs of `@deepseek-ai/dsh-web-deepseek-api` now serve model requests on the `deepseek-official` and `deepseek-account` routes while their credential is configured, and model requests on other routes only when the provider has a key of its own: a literal `apiKey`, or an `apiKeyEnv` other than `DEEPSEEK_API_KEY`. Without one, a conversation on another provider's model, such as a pi-ai route, is not offered `web_search`; with **Use the new Web Search API** turned on, it is not offered `web_fetch` either, and a direct `ctx.web.search()` or `ctx.web.fetch()` for it fails with `WEB_PROVIDER_ROUTE_DISABLED`. The key the Web search settings page saves is the shared `DEEPSEEK_API_KEY` and does not count.
|
||||
|
||||
Deployments whose users search or fetch through DeepSeek from conversations on other providers' models are affected.
|
||||
|
||||
## Migration
|
||||
|
||||
1. To keep DeepSeek search in those conversations, give the selected provider its own key reference, for example `web-search-deepseek.apiKeyEnv: DEEPSEEK_SEARCH_API_KEY`, or `web-deepseek-api.apiKeyEnv` with the Search and Fetch APIs selected. Then save the key on the Web search settings page, which stores it under that reference, or export the variable.
|
||||
2. Alternatively, mount another search provider and select it. The selection applies to every conversation, including those on DeepSeek models:
|
||||
|
||||
```yaml
|
||||
- name: '@deepseek-ai/dsh-web'
|
||||
config:
|
||||
searchProvider: exa
|
||||
- name: '@deepseek-ai/dsh-web-search-exa'
|
||||
config:
|
||||
apiKey: !!js process.env.EXA_API_KEY
|
||||
```
|
||||
|
||||
3. To fetch from those conversations without a key of the APIs' own, turn off **Use the new Web Search API** in **Plugins > Built-in plugin settings > Web search** and save, or set `web.fetchProvider: http`, so local HTTP fetch serves `web_fetch`.
|
||||
4. Confirm with a new conversation on the other model: its first model request declares `web_search` and `web_fetch`.
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "DeepSeek 网页搜索以及 DeepSeek Search 与 Fetch API 只有在有自己的密钥时才服务于使用其他提供方模型的对话。"
|
||||
---
|
||||
# DeepSeek Web 工具在其他模型上需要自己的密钥
|
||||
|
||||
[English](guide.md) | 中文
|
||||
|
||||
## 变更
|
||||
|
||||
`@deepseek-ai/dsh-web-search-deepseek` 以前会向每个对话提供 `web_search`,并且无论对话使用哪个模型,都用 `DEEPSEEK_API_KEY` 搜索。现在它与 `@deepseek-ai/dsh-web-deepseek-api` 的 Search 与 Fetch API 在凭据已配置时服务于 `deepseek-official` 与 `deepseek-account` 路由上的模型请求;其他路由上的模型请求,只有在提供方有自己的密钥时才服务:字面 `apiKey`,或不是 `DEEPSEEK_API_KEY` 的 `apiKeyEnv`。没有自己的密钥时,使用其他提供方模型的对话(例如 pi-ai 路由)不会获得 `web_search`;开启**启用新版 Web 搜索 API**时也不会获得 `web_fetch`,为它直接调用 `ctx.web.search()` 或 `ctx.web.fetch()` 会以 `WEB_PROVIDER_ROUTE_DISABLED` 失败。Web 搜索设置页保存的密钥是共享的 `DEEPSEEK_API_KEY`,不算自己的密钥。
|
||||
|
||||
用户在使用其他提供方模型的对话中通过 DeepSeek 搜索或抓取的部署会受影响。
|
||||
|
||||
## 迁移
|
||||
|
||||
1. 如需在这类对话中继续使用 DeepSeek 搜索,请给选中的提供方配置自己的密钥引用,例如 `web-search-deepseek.apiKeyEnv: DEEPSEEK_SEARCH_API_KEY`;选中 Search 与 Fetch API 时配置 `web-deepseek-api.apiKeyEnv`。然后在 Web 搜索设置页保存密钥(它会存到这个引用下),或导出该环境变量。
|
||||
2. 也可以挂载并选中另一个搜索提供方。该选择对所有对话生效,包括使用 DeepSeek 模型的对话:
|
||||
|
||||
```yaml
|
||||
- name: '@deepseek-ai/dsh-web'
|
||||
config:
|
||||
searchProvider: exa
|
||||
- name: '@deepseek-ai/dsh-web-search-exa'
|
||||
config:
|
||||
apiKey: !!js process.env.EXA_API_KEY
|
||||
```
|
||||
|
||||
3. 如需在没有 API 自己密钥的情况下在这类对话中抓取,请在**插件 > 内置插件配置 > 网页搜索**中关闭**启用新版 Web 搜索 API**并保存,或设置 `web.fetchProvider: http`,由本地 HTTP 抓取提供 `web_fetch`。
|
||||
4. 在使用其他模型的新对话中确认:其第一个模型请求声明了 `web_search` 与 `web_fetch`。
|
||||
Reference in new issue
Block a user