Skip to content

feat(runtime): add Alibaba native WebSearch for Qwen3.8-Max #3680

Description

@MoonOld

Problem

Alibaba Cloud Model Studio now documents native Web Search support for qwen3.8-max in the China (Beijing) and Singapore deployment scopes. The same model capability is documented as unsupported in the Frankfurt, Virginia, Tokyo, and Hong Kong global scopes. The Token Plan Harness surface also documents Web Search for qwen3.8-max-preview.

Maka cannot currently expose that provider-native search path:

  • providerHostedWebSearchAdapter('alibaba') resolves to openai-responses with implemented: false;
  • the Alibaba fallback model rule only recognizes Qwen 3.5 Plus/Flash families;
  • routeWebSearchTools() therefore removes WebSearch when model is selected, even for a supported Qwen3.8-Max deployment.

This forces users to configure a separate Tavily credential despite their selected model and deployment already offering native search.

Official references:

Desired outcome

Add a production Alibaba Model Studio native-search adapter, with Qwen3.8-Max as the initial supported model family.

  • Confirm and implement the official Qwen3.8-Max API wire instead of assuming that generic OpenAI compatibility implies Responses web_search.
  • Reuse the active Alibaba connection, endpoint, and credential in the primary model request; do not create a nested model request or store a second search credential.
  • Represent supported exact models/deployment scopes through model metadata or narrow fail-closed rules. Unsupported regions and models must not receive the tool.
  • Preserve existing providerExecuted call/result events, normalized source rows, opaque provider output for replay, privacy-mode removal, child-tool ceilings, and explicit no-fallback behavior.
  • Add capability-resolution, request-wire, result-projection/replay, and production-composition tests. A live smoke against a supported Beijing or Singapore deployment would pin the final contract.

Alternatives or workarounds

Users can select Tavily, but that requires a separate API key and executes as a client tool. Token Plan Harness search is another provider-managed surface, but it does not solve native search for ordinary Maka Alibaba model connections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions