You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
web-search-deepseek is statically configured with one endpoint and credential reference, while the model plane routes per agent (agent-default-model / the Models page). In a multi-provider deployment — e.g. chat via OpenCode Zen (https://opencode.ai/zen/go/v1, OPENCODE_GO_API_KEY) and search via DeepSeek-direct (https://api.deepseek.com/anthropic/v1, DEEPSEEK_API_KEY) — switching the model provider in the Models page leaves web search on the old endpoint and billing surface, because search does not follow the routed model provider.
Reproduction
Configure agent-default-model to opencode-go (OpenCode Zen Go) and set the web-search-deepseek settings section to the Zen endpoint.
In the Models page, switch the conversation model to DeepSeek-direct (deepseek-official).
Run web_search — it still hits the Zen endpoint (https://opencode.ai/zen/go/v1/messages) instead of DeepSeek-direct, because the two settings sections are independent and must be kept in sync by hand.
Expected: web_search follows the conversation's routed model provider — Zen when the model is opencode-go, DeepSeek-direct when the model is deepseek-official — with one key and one billing surface per provider.
Why this needs code
The web seam's provider selection (ctx.web in packages/web/web/src/index.ts) is process-level config: searchProvider pins one id and never reads the per-agent routed request/header (LlmCallConfig.provider in packages/llm/llm/src/call-config.ts). There is no configuration-only way to make the endpoint follow the conversation's model provider, so editing two settings sections in lockstep is the only current workaround — which silently drifts.
Proposed direction
Add an opt-in follow mode to the web-search-deepseek provider (it is already a generic Anthropic-compatible Messages client): per search, read the initiating agent's routed provider id (ctx.agents.currentInitiator()?.session.requestHeader()?.config.provider) and consult a providerEndpoints table ({ baseURL?, apiKeyEnv?, model? } per provider id) before falling back to the section's own values. Off by default, so existing deployments behave identically.
Affected area: packages/web/web-search-deepseek (provider + settings section) and packages/bundle/base/cordis.patch.yml (the shipped web-search-deepseek row).
Environment
@deepseek-ai/dsh 0.1.0-rc.6 (also reproducible from the repo source)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
web-search-deepseekis statically configured with one endpoint and credential reference, while the model plane routes per agent (agent-default-model/ the Models page). In a multi-provider deployment — e.g. chat via OpenCode Zen (https://opencode.ai/zen/go/v1,OPENCODE_GO_API_KEY) and search via DeepSeek-direct (https://api.deepseek.com/anthropic/v1,DEEPSEEK_API_KEY) — switching the model provider in the Models page leaves web search on the old endpoint and billing surface, because search does not follow the routed model provider.Reproduction
agent-default-modeltoopencode-go(OpenCode Zen Go) and set theweb-search-deepseeksettings section to the Zen endpoint.deepseek-official).web_search— it still hits the Zen endpoint (https://opencode.ai/zen/go/v1/messages) instead of DeepSeek-direct, because the two settings sections are independent and must be kept in sync by hand.Expected:
web_searchfollows the conversation's routed model provider — Zen when the model isopencode-go, DeepSeek-direct when the model isdeepseek-official— with one key and one billing surface per provider.Why this needs code
The web seam's provider selection (
ctx.webinpackages/web/web/src/index.ts) is process-level config:searchProviderpins one id and never reads the per-agent routedrequest/header(LlmCallConfig.providerinpackages/llm/llm/src/call-config.ts). There is no configuration-only way to make the endpoint follow the conversation's model provider, so editing two settings sections in lockstep is the only current workaround — which silently drifts.Proposed direction
Add an opt-in follow mode to the
web-search-deepseekprovider (it is already a generic Anthropic-compatible Messages client): per search, read the initiating agent's routed provider id (ctx.agents.currentInitiator()?.session.requestHeader()?.config.provider) and consult aproviderEndpointstable ({ baseURL?, apiKeyEnv?, model? }per provider id) before falling back to the section's own values. Off by default, so existing deployments behave identically.Affected area:
packages/web/web-search-deepseek(provider + settings section) andpackages/bundle/base/cordis.patch.yml(the shippedweb-search-deepseekrow).Environment
@deepseek-ai/dsh0.1.0-rc.6 (also reproducible from the repo source)All reactions