feat(runtime): add Qwen3.8-Max native WebSearch - #3685
Conversation
Generated-by: OpenAI Codex
A consumer that stops the adapter mid-stream (the reasoning-mismatch throw, a user stop) leaves the SDK without a finish chunk, so teardown rejects every result promise. usage and finishReason were already consumed, but response was only read on the completed continuation path — its rejection could surface as an unhandled rejection after the turn unwound, scheduler-timing owned (observed post-test on Windows, where Node makes it a crash). Sink it unconditionally in the teardown finally, and pin the property with an unhandledRejection trap in the mismatch test so every event loop proves the path leaves none behind.
Route Qwen3.8 Max Token Plan sessions to provider-executed Responses web search, and extend the pinned open-responses adapter with the published web_search request and web_search_call stream shapes. Generated-by: OpenAI Codex
|
Live Token Plan WebSearch smoke passed on exact feature head Execution path: the PR branch production Observed result:
Representative returned sources:
The temporary smoke runner was removed after the run and retained no credential material. |
|
Additional live boundary probe on exact head Observed:
This proves the dependency patch fixes the common Open Responses request/stream transport for DeepSeek as well, but it does not make DeepSeek production-ready yet:
Therefore DeepSeek should stay disabled until the action union and tests cover all three shapes and a normal routed smoke passes. The temporary probe runner was removed and retained no credential material. |
Map search, open_page, and find_in_page into the canonical provider-executed WebSearch output instead of collapsing every hosted action to search. Generated-by: OpenAI Codex
|
Shared mapper follow-up pushed in DeepSeek capability enablement remains out of this Alibaba PR and is isolated in #3694 / #3689. |
Summary
Adds the first Alibaba Harness-tool slice from #3163: provider-native
WebSearchforqwen3.8-maxon the Alibaba Token Plan China and Singapore access paths.WebSearchdescriptor to the official Responsestools: [{ type: "web_search" }]request shape;web_search_callitems into provider-executed call/result events, retaining generated queries, source URLs, and per-stepusage.x_tools;Refs #3163
Dependency
This is a stacked Draft PR on #3255, which supplies the
qwen3.8-maxToken Plan Responses wire and durable summary-item reasoning replay. The branch currently includes the two #3255 commits before the WebSearch commit. It should be rebased ontomainafter #3255 merges.This PR intentionally does not close #3163.
web_extractor, code interpreter, image-search tools, and broader Qwen 3.7 Responses routing remain follow-up slices.Verification
npm cireappliedpatches/@ai-sdk+open-responses+2.0.29.patchsuccessfullynpm run format:checknpm run lintnpm run check:asf-headersweb_searchtool, provider-executed call/result mapping, source projection, final text, andusage.x_toolsLive Token Plan China smoke passed on 2026-08-24 at head
46e452d32:qwen3.8-maxcompleted two provider-executed WebSearch calls, returned official source URLs, and finished the grounded answer withstop. The request and output shapes are pinned to Alibaba official documentation:Review focus
@ai-sdk/open-responses@2.0.29currently drops every provider-defined tool and does not decode built-in output items. The dependency patch is deliberately narrow: it recognizes only the existingopenai.web_searchprovider descriptor, emits only the published{ type: "web_search" }wire shape, maps onlyweb_search_call, and leaves every other provider-defined tool unsupported. The product-level wire test fails if the patch stops applying semantically.AI use
OpenAI Codex assisted with protocol research, implementation, tests, review, and PR drafting. The human contributor reviewed the scope and remains responsible for the contribution. The commit carries a
Generated-by: OpenAI Codextrailer.Checklist
Does this PR entail a change in behavior?