Skip to content

v0.8.65: Baidu Qianfan custom/first-class provider route fixture #3357

Description

@CaiWeibo

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

  1. Identify Qianfan endpoint request protocol and auth scheme.
  2. Decide first-class descriptor vs custom provider fixture.
  3. Add provider-scoped config examples for base URL, API key/auth source, and model id.
  4. Validate tool-call support and request serialization using mocked tests.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.8.65Targeting v0.8.65

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions