DSH / Atlas
2026-10-29implementedarchitecture

Web provider selection - independent menus over registered providers

Web 提供方选择——基于已注册提供方的独立下拉框

The web service selects search and fetch providers through two independent fields, `web.searchProvider` and `web.fetchProvider`. A settings control that writes both at once ties fetch billing and target access policy to the search choice, and a control that offers only the DeepSeek choices it knows cannot select a provider that another plugin registers. A picker over registered providers needs the Host to report them

English

Problem

The web service selects search and fetch providers through two independent fields, web.searchProvider and web.fetchProvider. A settings control that writes both at once ties fetch billing and target access policy to the search choice, and a control that offers only the DeepSeek choices it knows cannot select a provider that another plugin registers. A picker over registered providers needs the Host to report them, and the web capability seam has no availability observation for it to reuse. Messages search starts an auxiliary model request for each query, whereas the Search API returns structured sources directly. The Search and Fetch APIs also need a DeepSeek credential, and a credential setting of their own makes every user reconcile it with the model provider they chat with.

Decision

Users choose search and fetch providers independently from the Host's registered provider lists. The shipped composition fixes no search provider, so search follows the conversation's model route, and selects local HTTP fetch for fetch; the DeepSeek Search and Fetch APIs follow the conversation's DeepSeek credential.

Registered providers are observable; availability is not

WebSearchProvider and WebFetchProvider carry an optional title, the provider's display name, and an optional localized description of what the provider suits and what it costs or cannot do. ctx.web.listProviders() returns { search, fetch }, each a registration-ordered list of { id, title?, description? } entries, and the web Remote namespace exposes it as web/listProviders. Every registration and disposal emits the payload-free web/providers-changed event after the registry changes; the web service contains listener failures, so an observer cannot veto a registry change. dsh-api-remotes mounts the namespace and forwards the event, and Clients re-read the list after each notification and reconnect.

The lists include providers whose available() answers false. A picker shows what can be pinned, including a provider whose credential the user has not configured yet, whereas availability depends on per-request facts such as the Session's model route and credential state. Availability therefore stays an execution result: search() and fetch() resolve the configured provider at call time and throw the structured WebError, as the seam note records. The tool layer still never enumerates providers.

Independent selection

The Web search and fetch page writes web.searchProvider from its Search menu and web.fetchProvider from its Fetch menu. Each menu lists every registered provider for its capability by title (or id when title is absent), so plugin providers appear without page changes, and a selected id that the Host does not register stays visible as such. Official providers register no title; the page names them from its own locale dictionary and lists them first in a fixed order: the Search API (deepseek-search-api) followed by Messages search (deepseek-official) for search, and local HTTP fetch (http) followed by the Fetch API (deepseek-fetch-api) for fetch. Other providers follow in Host registration order. Selecting the deployment's composed provider clears the stored override instead of storing a duplicate value. The settings page README owns the page's controls.

Every registered provider is listed; a provider has no flag that keeps it out of the menus. This note supersedes the Search and Fetch API decision's rejection of listing every registered provider in a settings dropdown. Independent menus must offer providers that other plugins register, and the display metadata that listing needs is only the optional title and description. The description lives on the registration rather than in the page's dictionaries so that official and plugin providers explain themselves through one field, and a new provider needs no page change to describe its trade-offs. The rejected generic editor still stands: the page edits only the DeepSeek providers' settings, and other providers keep their own settings pages.

The Search and Fetch APIs read one web-deepseek-api namespace, and each resolves its own credential and endpoint, as the next section records. Messages search reads web-search-deepseek for its independent endpoint and key reference.

Credential resolution

Each of Search and Fetch has a billing setting, web-deepseek-api.searchBilling or fetchBilling, which the settings page edits as a Billing menu under the selected API. The default, auto, follows the DeepSeek credential of the conversation; account sends only the signed-in account's token and api-key only the API key, without falling back to the other. The conversation's route is the provider of the initiating Session's latest request context, which account sign-out also reads; ready() uses the route of the model request being prepared, so readiness and execution resolve the same plan.

The account credential is the one ctx.deepseekAccount releases for the dispatch endpoint under the origin of the base URL the mounted deepseek-account route connects to ctx.deepseekAuth, with /v1/tools; without that route, the origin DEEPSEEK_BASE_URL names is used. An HTTP 401 invalidates that credential. With auto billing on the deepseek-account route, the operation sends the account credential when that route is mounted and a credential is released. Every other auto operation, including one in an account conversation without a sign-in or a credential, sends the key of the mounted deepseek-official route, read under that route's apiKeyEnv (its base URL includes DEEPSEEK_BASE_URL), to the origin of that route's base URL with /v1/tools; without that route, DEEPSEEK_API_KEY goes to https://api.deepseek.com/v1/tools. With auto billing on a route other than the two mounted DeepSeek routes, which includes either DeepSeek route id while its plugin is not mounted, or outside a Session, an operation without a configured key sends the account token instead, so a signed-in user without a key keeps web tools in conversations on other model providers; on the mounted deepseek-official route it never sends the token, because that conversation bills the API key. Sending the API key in a signed-out account conversation keeps web tools available there. A user with only DEEPSEEK_API_KEY, including every headless, SDK, and ACP run, therefore searches and fetches by default, and a gateway or internal deployment set through the model provider's base URL serves web access at the same origin. A missing credential makes the capability not ready, and an operation fails with WEB_PROVIDER_CREDENTIAL_MISSING and guidance for its billing that names the account sign-in, the Models page and the reference, and the billing field. A mounted route whose configuration does not resolve is not treated as absent: an operation that needs that route is not ready and fails with WEB_PROVIDER_MISCONFIGURED before reading the credential that depends on that route, without trying later sources or sending the request, so a broken gateway setting never redirects requests to the official endpoint.

A capability whose YAML sets a non-empty searchBaseURL or searchApiKeyEnv (fetchBaseURL or fetchApiKeyEnv for Fetch) instead, whatever its billing, always sends the key under its *ApiKeyEnv (DEEPSEEK_API_KEY when unset) to its *BaseURL (the official base when unset) and never the account token, so an intranet or third-party endpoint receives only the key chosen for it. Each capability has its own fields because a deployment can serve search and fetch from different gateways. These fields are YAML-only, and an empty value counts as unset. Stored values of fields outside the schema, including baseURL, apiKeyEnv, and apiKey, load without schema errors and have no effect.

ctx.deepseekAuth orders and releases these credentials (DeepSeek request authentication): each DeepSeek model route connects the deployment its settings name, the API-key route with its key reference under apiKeyEnv, and the account sign-in is the credential ctx.deepseekAccount releases for a destination. Messages search and the Search and Fetch APIs ask that service instead of reading provider configuration, and it reads route keys, DEEPSEEK_API_KEY, and own keys through the reference helpers of dsh-credentials, so every DeepSeek request reads the credential store the same way; a credential whose authorization offers invalidation is invalidated after an HTTP 401. Shipped profiles need no per-profile credential override, because the API-key path works wherever DEEPSEEK_API_KEY or the DeepSeek API-key route has a key.

Defaults and stored selections

The base composition sets fetchProvider: http and no searchProvider. With no search provider configured, dsh-web prefers one registered, usable provider per provider route of the model request a search serves: Messages search (deepseek-official) on the deepseek-official and deepseek-account model routes, because DeepSeek makes no per-search charge for the server-side search tool a DeepSeek model request declares, and the Search API (deepseek-search-api) on every other route and outside a model request, because it returns sources without an auxiliary model request to a provider the conversation does not use. dsh-tool-web puts the route of the calling Session's latest model request into each search request, and searchReady() selects with the route of the step being prepared, so readiness and execution name the same provider. The two routes and two provider ids are constants of dsh-web: a deployment changes the outcome only by configuring searchProvider, and the settings page shows the unconfigured state as Automatic. Fetch defaults to local HTTP fetch because it has no per-request API charge, applies Harness's own URL validation and resource limits, and reaches intranet and local addresses. The Fetch API remains one menu choice away.

A stored selection, whether in the settings document or in a deployment's own composition, wins over the shipped default, and an upgrade does not rewrite it. A selection is never replaced at execution: when the selected provider is missing, unavailable, or fails, the operation fails with its structured error and does not fall back to another search or fetch provider. A fallback would send the query and credential to an endpoint the user did not choose and change billing without notice.

Legacy Messages search

The DeepSeek Messages search provider remains available as DeepSeek server-side search and serves unconfigured searches on the DeepSeek model routes. A stored web.searchProvider: deepseek-official (or DSH_WEB_SEARCH_PROVIDER=deepseek-official) selects it for every route, so users whose gateways serve Messages search but not /v1/tools can retain their working provider.

The Messages provider owns and writes web/deepseek-search-llm-request. The declaration and payload retain compatibility with released Sessions; the Search and Fetch API package neither declares nor writes this auxiliary event.

Alternatives considered

Let each provider declare the routes it is the default for. A defaultFor(llmProvider) member on WebSearchProvider keeps dsh-web free of DeepSeek ids, but it changes both DeepSeek provider packages for a rule that has one instance.

Put the route-to-provider table in dsh-web configuration. A profile patch replaces a row's whole config, so a stored provider selection would also store a copy of the table and stop following the shipped one, and the table is not a choice users need: fixing a provider already overrides it.

Have the Search API provider delegate to Messages search on DeepSeek routes. The menu would keep two entries, but the entry named DeepSeek Search API would run another provider, a user could not fix the Search API for a DeepSeek model, and one provider package would depend on the other.

Keep one switch for both APIs. It lets Fetch API adoption need no configuration edit, but it ties fetch billing and target access policy to the search choice, and it cannot express a provider that another plugin registers.

Filter the lists by availability, or add availability to each entry. A filtered list hides a provider while its credential is missing, right when the user needs to choose and configure it. Availability also depends on the request's model route and credential state, so a listed boolean could disagree with execution. The archived observation-surface decision allows only the smallest signal a consumer reads; the menus read registration only.

Keep a fixed provider catalog in the Client. The Client would show ids the Host does not register as normal choices and would never show a provider that a plugin registers at runtime.

Carry the provider list in the change event. A payload-free event leaves one read path for initial load, notifications, and reconnects, so the Client never has to order an event payload against a concurrent read.

Keep display names in the Client or in a separate Host registry. The registering plugin knows its provider's name; a separate map would let a provider and its label register or dispose independently.

Fall back to another provider when the selected one fails. A fallback hides gateway and credential misconfiguration, sends the query to a second service, and changes what the request costs without the user choosing it.

Remove Messages search and let a stored deepseek-official select the Search API. Gateways can support Messages search without Search API routes. Retaining the legacy provider preserves that choice instead of changing its protocol and billing.

Default fetch to the Fetch API as well. It adds a per-request charge to every fetch and delegates page retrieval and target access policy to the service, which fetches from its own side rather than from the user's machine.

Choose a credential source per capability on the settings page, from a menu listing the configured DeepSeek model providers plus a custom key and base URL, without fallback between sources. The visible setting would state the whole rule, but the configuration surface is too large for users to understand: each capability adds a credential menu that the user must keep in step with the model provider they chat with, and a signed-in user chatting on the account route gets no web tools until they change it. The default auto billing follows the conversation's credential without configuration, the billing menu offers only the two DeepSeek credentials, and the YAML-only own fields cover endpoints that differ from the model provider.

Share one custom key and base URL between Search and Fetch. It cannot express a deployment that serves the two APIs from different gateways.

Fail an account conversation without a sign-in instead of sending the API key. It would keep the account route from ever billing the API key, but signed-out account conversations would lose web tools even when a DeepSeek API key is configured.

Send the account token whenever the user is signed in, whatever the conversation's route. It would bill web access to the account during conversations on the API-key route or on another provider, which the user did not choose for them.

Consequences

Users without a stored search selection search through Messages search in a conversation on a DeepSeek model route: each search is one auxiliary Messages request billed as model tokens, to Messages search's own endpoint, which does not follow the model provider's base URL, so a deployment whose DeepSeek model provider points at a gateway gets search failures until it saves that gateway as the Messages Base URL or fixes the Search API (upgrade guide). On every other route they search through the Search API: their queries go to the Search endpoint the conversation's DeepSeek credential selects, cost a Search API request each, and send up to 128 characters of the latest human prompt as ori_question unless sendOriginalQuestion is off. Deployments whose gateway has no /v1/tools routes get search failures there until they select Messages search or set searchBaseURL to a base that serves them. dsh-web names two DeepSeek model routes and two DeepSeek search providers, which a second route-specific default would have to replace with a provider-neutral rule. A stored deepseek-official selection uses Messages search. Users without a stored fetch selection fetch through local HTTP fetch. A signed-in user without an API key has DeepSeek web search with auto billing in every conversation except those on the DeepSeek API-key route; the upgrade guide lists each affected setup.

A plugin provider, including one written in creator mode, appears in the matching menu as soon as it registers, under its title. The menus can offer a provider that cannot run for the current request; the failure appears when a search or fetch runs. Each registry change costs one forwarded event and one list read in each Client that observes it.

Verification

web.spec.ts covers list contents and order, titles, events after registration and disposal, no event for a rejected duplicate, contained listener failures, and the per-route preference with its fallbacks; tool-web.spec.ts covers the route web_search sends, and the web-search-legacy-endpoint-guidance snapshot runs Messages search on a DeepSeek route with no provider configured. deepseek.spec.ts covers the independent Messages provider, and credential-resolution.spec.ts covers, for both capabilities, the account token on the account route and its invalidation after HTTP 401, the API-key fallback without a sign-in, the route key and endpoint in official, non-DeepSeek, and Session-less conversations, the account fallback without a key outside the DeepSeek routes, account-only and API-key-only billing on every route, own fields over billing, DEEPSEEK_API_KEY and the official base without that route, YAML-only own fields that never send the token, independent capabilities, readiness matching each operation, and ignored removed fields; composition.spec.ts boots the real model routes through the Loader. remote-events.host.spec.ts covers event forwarding, and base.spec.ts pins the shipped defaults. The settings page's controller and card specs and the plugin configuration browser scenario cover menu contents, independent Search and Fetch selection, the billing menus of the DeepSeek APIs, and the settings each provider keeps.

中文

问题

Web 服务通过 web.searchProvider 和 web.fetchProvider 两个独立字段分别选择搜索与抓取提供方。用一个设置控件同时写入两者,会把抓取的计费和目标访问策略绑在搜索选择上;只提供已知 DeepSeek 选项的控件,也无法选用其他插件注册的提供方。基于已注册提供方的选择器需要 Host 报告这些提供方,而 Web 能力 seam 没有可供复用的可用性观察接口。Messages 搜索每次查询都会发起一次辅助模型请求,而 Search API 能直接返回结构化来源。Search 与 Fetch API 还需要 DeepSeek 凭据;为它们单独设置凭据,会让每个用户都要把它与自己对话所用的模型提供方对齐。

决策

用户从 Host 已注册的提供方列表中分别选择搜索和抓取提供方。内置组合不固定搜索提供方,搜索因此跟随会话的模型路由,抓取设为本地 HTTP 抓取;DeepSeek Search 与 Fetch API 跟随会话的 DeepSeek 凭据。

已注册的提供方可观察,可用性不可观察

WebSearchProvider 和 WebFetchProvider 带有可选的 title(提供方的显示名称)和可选的多语言 description(说明该提供方适合什么、有什么代价或做不到什么)。ctx.web.listProviders() 返回 { search, fetch },二者均为按注册顺序排列的 { id, title?, description? } 列表,web Remote namespace 将其暴露为 web/listProviders。每次注册和注销都会在注册表变更后触发无载荷的 web/providers-changed 事件;Web 服务会隔离监听器异常,因此观察者无法阻断注册表变更。dsh-api-remotes 挂载该 namespace 并转发该事件,Client 在收到通知和重连后重新读取列表。

列表包含 available() 返回 false 的提供方。选择器展示的是可固定选用的项,包括用户尚未配置凭据的提供方;而可用性取决于会话的模型路由、凭据状态等单次请求条件。因此可用性仍是执行期结果:search() 和 fetch() 在调用时解析所配置的提供方并抛出结构化 WebError,与 seam 记录一致。工具层仍从不枚举提供方。

分别选择

「网页搜索与获取」页由 Search 下拉框写入 web.searchProvider,由 Fetch 下拉框写入 web.fetchProvider。每个下拉框以 title(缺省时用 id)列出该能力的所有已注册提供方,因此插件提供方无需修改页面即可出现,且 Host 未注册的已选 id 仍会照常显示。官方提供方不注册 title,由页面用自己的语言字典命名,并按固定顺序排在最前:搜索依次为 Search API(deepseek-search-api)与 Messages 搜索(deepseek-official),抓取依次为本地 HTTP 抓取(http)和 Fetch API(deepseek-fetch-api)。其他提供方按 Host 注册顺序排列。选择部署组合的默认提供方会清除已保存的覆盖值,而非冗余保存一份副本。设置页 README 负责页面控件说明。

所有已注册的提供方都会列出;提供方没有可以把自己排除在下拉框之外的标志。本 Note 取代了 Search 与 Fetch API 决策对「在设置页用下拉框列出所有已注册的提供方」的否决。独立的下拉框必须提供其他插件注册的提供方,而列出提供方所需的展示元数据只是可选的 title 和 description。说明放在注册信息里而不是页面词典里,这样官方与插件提供方都通过同一个字段说明自己,新提供方无需修改页面即可说明其取舍。被否决的通用编辑表单仍然成立:该页面只编辑 DeepSeek 提供方的设置,其他提供方保留各自的设置页。

Search 与 Fetch API 读取同一个 web-deepseek-api namespace,并各自解析自己的凭据和端点,见下一节。Messages 搜索从 web-search-deepseek 读取独立的端点和密钥引用。

凭据解析

Search 与 Fetch 各有一个计费方式设置 web-deepseek-api.searchBilling 或 fetchBilling,设置页在选中的 API 下方以计费方式下拉框编辑它。默认值 auto 跟随会话的 DeepSeek 凭据;account 只发送已登录账号的令牌,api-key 只发送 API 密钥,都不回退到另一种凭据。会话的路由是发起会话最近一次请求上下文的 provider,账号退出登录读取的也是它;ready() 使用正在准备的模型请求的路由,因此就绪判断与执行解析出相同的方案。

账号凭据是 ctx.deepseekAccount 为请求端点释放的凭据,端点位于已挂载的 deepseek-account 路由向 ctx.deepseekAuth 登记的基础地址的 origin 加 /v1/tools 下;没有该路由时使用 DEEPSEEK_BASE_URL 所指的 origin。HTTP 401 会作废该凭据。auto 计费在 deepseek-account 路由上,若该路由已挂载且释放出凭据,操作发送账号凭据。其他所有 auto 操作,包括账号会话中没有登录或没有凭据的操作,都把已挂载的 deepseek-official 路由的密钥(按该路由的 apiKeyEnv 读取,其基础地址包含 DEEPSEEK_BASE_URL)发往该路由基础地址的 origin 加 /v1/tools;没有该路由时,把 DEEPSEEK_API_KEY 发往 https://api.deepseek.com/v1/tools。auto 计费在两个已挂载的 DeepSeek 路由之外的路由上(包括这两个路由 id 之一而其插件未挂载的情况)或会话之外,没有配置密钥的操作改为发送账号令牌,因此已登录但没有密钥的用户在其他模型提供方的会话中仍可使用网页工具;在已挂载的 deepseek-official 路由上从不发送令牌,因为该会话按 API 密钥计费。未登录的账号会话发送 API 密钥,网页工具因此在其中仍然可用。因此只有 DEEPSEEK_API_KEY 的用户(包括所有 headless、SDK 与 ACP 运行)默认即可搜索和抓取,通过模型提供方基础地址设置的网关或内部部署也在同一 origin 上提供 Web 访问。缺少凭据时,该能力未就绪,操作以 WEB_PROVIDER_CREDENTIAL_MISSING 失败,指引信息按计费方式点名账号登录、模型页面与该引用,以及计费方式字段。已挂载但配置无法解析的路由不视为不存在:需要该路由的操作未就绪,并在读取依赖该路由的凭据前以 WEB_PROVIDER_MISCONFIGURED 失败,不再尝试后续来源,也不发送请求,因此网关设置出错时请求不会被改发到官方端点。

在 YAML 中设置了非空 searchBaseURL 或 searchApiKeyEnv(Fetch 为 fetchBaseURL 或 fetchApiKeyEnv)的能力,则无论计费方式如何,始终把其 *ApiKeyEnv(未设置时为 DEEPSEEK_API_KEY)下的密钥发往其 *BaseURL(未设置时为官方基础地址),从不发送账号令牌,因此内网或第三方端点只收到为它选择的密钥。每个能力有自己的字段,因为一个部署可以由不同网关提供搜索和抓取。这些字段只能在 YAML 中设置,空值视为未设置。schema 之外字段的已保存值,包括 baseURL、apiKeyEnv 和 apiKey,可以加载而不产生 schema 错误,且不生效。

这些凭据由 ctx.deepseekAuth 排序并释放(DeepSeek 请求鉴权):每条 DeepSeek 模型路由登记其设置所指的部署,API 密钥路由同时登记其 apiKeyEnv 下的密钥引用,账号登录凭据则是 ctx.deepseekAccount 为目标地址释放的凭据。Messages 搜索以及 Search 与 Fetch API 向该服务索取凭据而不读取提供方配置,该服务通过 dsh-credentials 的引用函数读取路由密钥、DEEPSEEK_API_KEY 和单独配置的密钥,因此每个 DeepSeek 请求都以同一方式读取凭据库;授权提供失效操作的凭据会在 HTTP 401 后被作废。内置配置不需要按 profile 覆盖凭据,因为只要 DEEPSEEK_API_KEY 或 DeepSeek API 密钥路由有密钥,API 密钥路径就能工作。

默认值与已保存的选择

base 组合设置 fetchProvider: http,不设置 searchProvider。没有配置搜索提供方时,dsh-web 按搜索所服务的模型请求的提供方路由,优先选用一个已注册且可用的提供方:在 deepseek-official 与 deepseek-account 模型路由上是 Messages 搜索(deepseek-official),因为 DeepSeek 不对 DeepSeek 模型请求声明的服务端搜索工具按次收费;在其他路由上以及模型请求之外是 Search API(deepseek-search-api),因为它返回来源时无需向会话没有使用的提供方发起辅助模型请求。dsh-tool-web 把发起调用的 Session 最近一次模型请求的路由写入每个搜索请求,searchReady() 按正在准备的步骤的路由选择,因此就绪判断与执行指向同一个提供方。这两条路由和两个提供方 id 是 dsh-web 中的常量:部署只能通过配置 searchProvider 改变结果,设置页把未配置的状态显示为自动选择。抓取默认使用本地 HTTP 抓取,因为它没有按次的 API 费用,执行 Harness 自身的 URL 校验和资源限制,并且可以访问内网和本地地址。Fetch API 仍可在下拉框中直接选择。

已保存的选择——无论位于设置文档还是部署自身的组合中——优先于内置默认值,升级不会改写它。执行时从不替换选择:所选提供方缺失、不可用或失败时,操作以结构化错误失败,不会回退到其他搜索或抓取提供方。回退会把查询和凭据发往用户未选择的端点,并在不提示的情况下改变计费。

旧版 Messages 搜索

DeepSeek Messages 搜索提供方仍以 DeepSeek 服务端搜索提供,并承担 DeepSeek 模型路由上未配置提供方的搜索。已保存的 web.searchProvider: deepseek-official(或 DSH_WEB_SEARCH_PROVIDER=deepseek-official)会在所有路由上选中它,因此网关支持 Messages 搜索但不提供 /v1/tools 的用户可以保留可用的提供方。

Messages 提供方负责声明并写入 web/deepseek-search-llm-request。声明和载荷保持与已发布会话兼容;Search 与 Fetch API 包既不声明也不写入这一辅助事件。

考虑过的替代方案

让每个提供方声明自己是哪些路由的默认项。 在 WebSearchProvider 上加一个 defaultFor(llmProvider) 成员可以让 dsh-web 不含 DeepSeek 的 id,但要为只有一个实例的规则修改两个 DeepSeek 提供方包。

把路由到提供方的表放进 dsh-web 的配置。 profile 补丁会替换条目的整个 config,因此已存的提供方选择会连带存下这张表的副本,不再跟随内置的表;而这张表也不是用户需要做的选择:固定提供方已经可以覆盖它。

让 Search API 提供方在 DeepSeek 路由上转交给 Messages 搜索。 菜单可以保持两项,但名为 DeepSeek Search API 的条目会运行另一个提供方,用户无法为 DeepSeek 模型固定 Search API,而且一个提供方包要依赖另一个。

保留一个同时切换两个 API 的开关。 它让使用 Fetch API 无需修改配置,但把抓取的计费和目标访问策略绑在搜索选择上,也无法表达其他插件注册的提供方。

按可用性过滤列表,或在每个条目中加入可用性。 过滤后的列表恰好会在凭据缺失时隐藏提供方,而这正是用户需要选择并配置它的时候。可用性还取决于请求的模型路由和凭据状态,列表中的布尔值可能与实际执行结果不一致。已归档的观察面决策只允许引入消费方实际读取的最小信号;下拉框只读取注册情况。

在 Client 中维护固定的提供方目录。 Client 会把 Host 未注册的 id 当作正常选项展示,且永远无法展示插件在运行时注册的提供方。

在变更事件中携带提供方列表。 无载荷事件让初次加载、变更通知和断线重连共用同一条读取路径,Client 无需为事件载荷与并发读取结果排序。

把显示名称放在 Client 或单独的 Host 注册表中。 注册插件最清楚自身提供方的名称;拆成独立映射会让提供方与其标签各自独立注册或注销。

所选提供方失败时回退到其他提供方。 回退会掩盖网关和凭据的配置错误,将查询发往第二个服务,并在未经用户选择的情况下改变请求的费用。

移除 Messages 搜索,让已保存的 deepseek-official 选中 Search API。 网关可能支持 Messages 搜索,却没有 Search API 路由。保留旧版提供方可以保留这一选择,而不改变其协议和计费。

抓取也默认使用 Fetch API。 它会给每次抓取增加按次费用,并把页面抓取和目标访问策略交给服务端,由服务端而不是用户的机器发起抓取。

在设置页为每个能力选择一种凭据来源,下拉框列出已配置的 DeepSeek 模型提供方,外加自定义密钥和基础地址,来源之间不回退。这样可见的设置就能说明全部规则,但配置面过大,用户难以理解:每个能力都多出一个凭据下拉框,用户必须让它与自己对话所用的模型提供方保持一致;在账号路由上对话的已登录用户在修改设置前没有网页工具。默认的 auto 计费无需配置即跟随会话的凭据,计费方式下拉框只提供两种 DeepSeek 凭据,与模型提供方不同的端点由只能在 YAML 中设置的单独字段覆盖。

Search 与 Fetch 共用一个自定义密钥和基础地址。 它无法表达由不同网关分别提供两个 API 的部署。

账号会话未登录时直接失败,而不是发送 API 密钥。 这样账号路由永远不会消耗 API 密钥,但即使配置了 DeepSeek API 密钥,未登录的账号会话也会失去网页工具。

只要用户已登录就发送账号令牌,不论会话的路由。 这会让在 API 密钥路由或其他提供方上进行的会话把 Web 访问记到账号上,而用户并没有为这些会话这样选择。

影响

没有已保存搜索选择的用户在 DeepSeek 模型路由上的会话中通过 Messages 搜索进行搜索:每次搜索是一次按模型 token 计费的辅助 Messages 请求,发往 Messages 搜索自己的端点,该端点不跟随模型提供方的基础地址,因此 DeepSeek 模型提供方指向网关的部署会遇到搜索失败,直到把该网关保存为 Messages Base URL 或固定使用 Search API(升级指南)。在其他路由上他们通过 Search API 搜索:查询发往会话的 DeepSeek 凭据所选的 Search 端点,每次计为一次 Search API 请求,并且除非关闭 sendOriginalQuestion,还会把最近一条用户提示的至多 128 个字符作为 ori_question 发送。网关没有 /v1/tools 路由的部署在这些路由上会遇到搜索失败,直到选择 Messages 搜索,或把 searchBaseURL 设为提供这些路由的基础地址。dsh-web 点名了两条 DeepSeek 模型路由和两个 DeepSeek 搜索提供方,再出现一个按路由的默认值时须改为提供方无关的规则。已保存的 deepseek-official 选择使用 Messages 搜索。没有已保存抓取选择的用户通过本地 HTTP 抓取。已登录但没有 API 密钥的用户在 auto 计费下,除 DeepSeek API 密钥路由上的会话外,都可以使用 DeepSeek 网页搜索;升级指南列出了每种受影响的配置。

插件提供方(包括在创作模式下编写的提供方)一经注册,就会以其 title 出现在对应的下拉框中。下拉框可能提供在当前请求中无法运行的提供方;失败会在执行搜索或抓取时出现。每次注册表变更会在每个观察它的 Client 中产生一次转发事件和一次列表读取。

验证

web.spec.ts 覆盖列表内容与顺序、标题、注册与撤销后的事件、重复注册被拒绝时不触发事件、监听器失败的隔离,以及按路由的优先规则及其回退;tool-web.spec.ts 覆盖 web_search 发送的路由,web-search-legacy-endpoint-guidance 快照在未配置提供方的 DeepSeek 路由上运行 Messages 搜索。deepseek.spec.ts 覆盖独立的 Messages 提供方,credential-resolution.spec.ts 针对两个能力覆盖账号路由上的账号令牌及其在 HTTP 401 后被作废、未登录时回退到 API 密钥、官方、非 DeepSeek 和会话之外的操作使用路由密钥与端点、DeepSeek 路由之外没有密钥时回退到账号、在每个路由上只用账号或只用 API 密钥的计费、单独字段优先于计费方式、没有该路由时使用 DEEPSEEK_API_KEY 与官方基础地址、从不发送令牌的 YAML 单独字段、两个能力相互独立、就绪判断与每次操作一致,以及被忽略的已移除字段;composition.spec.ts 通过 Loader 启动真实的模型路由。remote-events.host.spec.ts 覆盖事件转发,base.spec.ts 固定内置默认值。设置页的 controller 与 card 测试以及插件配置浏览器场景覆盖下拉框内容、Search 与 Fetch 的分别选择、DeepSeek API 的计费方式下拉框,以及各提供方保留的设置。