Problem
CodeWhale already has a provider-native web-search backend for exact direct
OpenAI, Anthropic, and xAI routes. Users of documented first-party DeepSeek,
Alibaba ModelStudio/Qwen, Moonshot/Kimi, Z.AI/BigModel, and Xiaomi MiMo routes
still fall through to separately configured search backends even when their
active provider account includes native web search.
These providers do not share one wire contract. Treating an OpenAI-compatible
transport as proof of search support risks sending unsupported requests or
credentials to custom and neighboring endpoints.
Proposed solution
Extend the existing provider-native backend with:
- sourced, three-state capability facts;
- exact provider, model, product, and endpoint gates;
- narrow adapters for each documented provider contract;
- fail-closed behavior for aliases, aggregators, custom gateways, local models,
coding-only plans, and neighboring endpoint paths;
- the existing
provider-native -> configured/local -> fallback receipt chain;
- domain constraints applied before deciding that an attempt succeeded;
- removal of provider-generated answers whenever returned citations violate or
cannot prove the requested domain constraint;
- independent bounded deadlines for provider-native and configured/local search;
- bounded Kimi Formula rounds and total official-tool calls.
Intended slices
- Shared domain-filter and fallback-budget correctness fixes.
- DeepSeek Responses native search.
- Alibaba ModelStudio Token Plan/Qwen native search.
- Z.AI global and BigModel China structured search.
- Moonshot/Kimi direct API, Kimi Code, and K3 Formula search.
- Xiaomi MiMo native search.
Each implementation PR should use Refs #... (partial) until the tracker is
fully satisfied.
Use case
A user who already selected an exact first-party cloud model should be able to
use that provider's included web-search capability first, while retaining the
configured/local backend as an explicit fallback. A compatible gateway, local
model, or adjacent product endpoint must not inherit that capability.
Acceptance criteria
Provider documentation
Alternatives considered
- Always use configured/local search: reliable as a fallback, but it wastes an
included provider capability and may require another account.
- Infer support from OpenAI compatibility: rejected because these provider
products expose different search protocols.
- Submit every provider in one implementation PR: rejected because it mixes
independent wire contracts and obscures live-verification gaps.
Impact
This gives direct-provider users higher-quality regional search without removing
or weakening configurable local backends. It also reduces downstream fork debt
by keeping reusable provider behavior in the engine.
Out of scope
- Custom or OpenAI-compatible gateways without provider-owned documentation.
- Local-model web search.
- New authentication flows.
- Mandatory live-provider credentials in CI.
- Gemini support; it should be handled separately on the current Google-provider
architecture.
Related
Implementation PRs
These boxes track merged slices. Mock-only and live-verification boundaries are
recorded in each PR rather than inferred from CI.
Problem
CodeWhale already has a provider-native web-search backend for exact direct
OpenAI, Anthropic, and xAI routes. Users of documented first-party DeepSeek,
Alibaba ModelStudio/Qwen, Moonshot/Kimi, Z.AI/BigModel, and Xiaomi MiMo routes
still fall through to separately configured search backends even when their
active provider account includes native web search.
These providers do not share one wire contract. Treating an OpenAI-compatible
transport as proof of search support risks sending unsupported requests or
credentials to custom and neighboring endpoints.
Proposed solution
Extend the existing provider-native backend with:
coding-only plans, and neighboring endpoint paths;
provider-native -> configured/local -> fallbackreceipt chain;cannot prove the requested domain constraint;
Intended slices
Each implementation PR should use
Refs #... (partial)until the tracker isfully satisfied.
Use case
A user who already selected an exact first-party cloud model should be able to
use that provider's included web-search capability first, while retaining the
configured/local backend as an explicit fallback. A compatible gateway, local
model, or adjacent product endpoint must not inherit that capability.
Acceptance criteria
provider-native request.
a complete receipt.
constraints, fallback receipts, and timeout boundaries.
mock-only routes are disclosed explicitly.
PRs.
Provider documentation
https://api-docs.deepseek.com/api/create-response/
https://help.aliyun.com/en/model-studio/token-plan-harness-tool
https://platform.kimi.com/docs/guide/use-official-tools
https://docs.z.ai/api-reference/tools/web-search
https://docs.bigmodel.cn/api-reference/%E5%B7%A5%E5%85%B7-api/%E7%BD%91%E7%BB%9C%E6%90%9C%E7%B4%A2
https://mimo.mi.com/docs/en-US/usage-guide/tool-calling/web-search
Alternatives considered
included provider capability and may require another account.
products expose different search protocols.
independent wire contracts and obscures live-verification gaps.
Impact
This gives direct-provider users higher-quality regional search without removing
or weakening configurable local backends. It also reduces downstream fork debt
by keeping reusable provider behavior in the engine.
Out of scope
architecture.
Related
Implementation PRs
These boxes track merged slices. Mock-only and live-verification boundaries are
recorded in each PR rather than inferred from CI.