Goal
Support the Baidu Qianfan coding plan model through the provider-scoped routing architecture.
This issue preserves @CaiWeibo's report that the model is not working with tools and that --provider needs a custom/provider option for configuring URL, API key, and model name.
Architecture Contract
This should fit #1519, #2608, #3084, #3311, and #3384.
Baidu Qianfan can be supported either as:
- a first-class
ProviderDescriptor if the endpoint/auth/request protocol/model policy is stable enough; or
- a custom OpenAI-compatible/protocol-compatible provider config if users need to bring their own base URL, key, and model id.
In either path:
Scope
- Identify Qianfan endpoint request protocol and auth scheme.
- Decide first-class descriptor vs custom provider fixture.
- Add provider-scoped config examples for base URL, API key/auth source, and model id.
- Validate tool-call support and request serialization using mocked tests.
- Expose readiness/capability in
/provider and selectable model rows in /model.
Acceptance Criteria
- A Qianfan route can be configured with provider, base URL, auth source, and model id.
- Tool support is represented as supported/unsupported/unknown rather than assumed.
--provider / /provider can select the route without requiring hardcoded global model strings.
- Unknown/custom Qianfan model ids are preserved under provider scope.
- Tests cover auth readiness, request protocol, tool capability, route explanation, and failed-route rollback.
Verification
cargo test -p codewhale-tui custom_provider --locked
cargo test -p codewhale-tui provider_adapter --locked
cargo test -p codewhale-tui route_resolver --locked
cargo test -p codewhale-tui tools --locked
Related
Goal
Support the Baidu Qianfan coding plan model through the provider-scoped routing architecture.
This issue preserves @CaiWeibo's report that the model is not working with tools and that
--providerneeds a custom/provider option for configuring URL, API key, and model name.Architecture Contract
This should fit #1519, #2608, #3084, #3311, and #3384.
Baidu Qianfan can be supported either as:
ProviderDescriptorif the endpoint/auth/request protocol/model policy is stable enough; orIn either path:
Scope
/providerand selectable model rows in/model.Acceptance Criteria
--provider//providercan select the route without requiring hardcoded global model strings.Verification
Related