You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "MoonOld (via GitHub)" <gi...@apache.org> on 2026/08/24 07:29:35 UTC

[PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

MoonOld opened a new pull request, #3685:
URL: https://github.com/apache/maka/pull/3685

   ## Summary
   
   Adds the first Alibaba Harness-tool slice from #3163: provider-native `WebSearch` for `qwen3.8-max` on the Alibaba Token Plan China and Singapore access paths.
   
   - keeps capability routing fail-closed and exact-model scoped; Qwen 3.7 remains disabled because Maka still routes it through Chat;
   - lowers the canonical Maka `WebSearch` descriptor to the official Responses `tools: [{ type: "web_search" }]` request shape;
   - decodes streamed `web_search_call` items into provider-executed call/result events, retaining generated queries, source URLs, and per-step `usage.x_tools`;
   - reuses the existing Runtime projection for normalized source rows, durable events, UI/export, privacy-mode removal, and tool ceilings;
   - documents the current replay boundary: the durable episode and grounded answer survive, while the Open Responses adapter omits the provider-owned pair from the next request rather than generating a dangling function output.
   
   Refs #3163
   
   ## Dependency
   
   This is a stacked Draft PR on #3255, which supplies the `qwen3.8-max` Token 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 onto `main` after #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
   
   - fresh `npm ci` reapplied `patches/@ai-sdk+open-responses+2.0.29.patch` successfully
   - `npm run format:check`
   - `npm run lint`
   - `npm run check:asf-headers`
   - Core full suite: 652 passed, 0 failed
   - Runtime full suite: 3,024 passed, 13 skipped, 0 failed
   - Runtime typecheck and affected workspace builds passed
   - deterministic raw-SSE contract test asserts the outbound `web_search` tool, provider-executed call/result mapping, source projection, final text, and `usage.x_tools`
   
   Live Token Plan WebSearch smoke remains pending. The request and output shapes are pinned to Alibaba official documentation:
   
   - https://www.alibabacloud.com/help/en/model-studio/web-search
   - https://www.alibabacloud.com/help/en/model-studio/retrieve-a-response
   - https://www.alibabacloud.com/help/en/model-studio/token-plan-harness-tool
   
   ## Review focus
   
   `@ai-sdk/open-responses@2.0.29` currently drops every provider-defined tool and does not decode built-in output items. The dependency patch is deliberately narrow: it recognizes only the existing `openai.web_search` provider descriptor, emits only the published `{ type: "web_search" }` wire shape, maps only `web_search_call`, and leaves every other provider-defined tool unsupported. The product-level wire test fails if the patch stops applying semantically.
   
   ## AI use
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   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 Codex` trailer.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-5476831326

   #3685 has been rebuilt after #3255 merged and is now on exact head `3ae89609a`, directly based on current `main` `bd951aa88`.
   
   Key changes:
   
   - removed the stacked #3255 commits from this branch;
   - regenerated the temporary dependency patch against the currently pinned `@ai-sdk/open-responses@2.0.34`, preserving the released reasoning-summary mapping;
   - tied the patch to upstream vercel/ai#19933 and implementation PR vercel/ai#19939, with an explicit delete-on-release rule;
   - added the patch to the root source-license inventory;
   - retained only the Qwen WebSearch capability/routing and request/stream action tests.
   
   Exact-head verification is green: fresh `npm ci`, build, workspace typecheck, format/lint/ASF headers, 269 focused cross-surface tests, Runtime 3,097 passed / 13 skipped / 0 failed, and release 141/141.
   
   The Token Plan China live smoke also passed on the rebased tree: `qwen3.8-max` received exactly one native `web_search` descriptor, emitted a provider-executed WebSearch pair, completed a grounded answer, and completed a second durable-context turn without replaying a dangling `web_search_call` item.
   
   This remains Draft while #19939 is awaiting upstream review. Once its bare-extension codec is published, the dependency patch and legal/README entries should be deleted before this PR is marked ready.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-5392103131

   Live Token Plan WebSearch smoke passed on exact feature head `46e452d32` (2026-08-24).
   
   Execution path: the PR branch production `getAIModel` + `ModelAdapter`, configured Alibaba Token Plan China connection, exact model `qwen3.8-max`, and the canonical provider `WebSearch` descriptor. The credential was read only in process from the local credential vault and was never printed.
   
   Observed result:
   
   - outcome: `completed`; finish reason: `stop`;
   - two `WebSearch` calls, both marked `providerExecuted: true`;
   - provider results included the official Qwen3.8-Max model page and Alibaba Model Studio Web Search documentation;
   - final grounded answer correctly reported that Qwen3.8-Max supports Web Search and named the official source URLs;
   - usage: 9,386 input / 866 output / 532 reasoning / 10,252 total tokens;
   - no local ToolRuntime WebSearch execution occurred.
   
   Representative returned sources:
   
   - https://help.aliyun.com/en/model-studio/qwen3-8-max
   - https://help.aliyun.com/zh/model-studio/web-search
   - https://www.alibabacloud.com/help/en/model-studio/web-search
   
   The temporary smoke runner was removed after the run and retained no credential material.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-6051360308

   Friendly reminder / 友情提醒:upstream `vercel/ai#19933` 的后续实现 `vercel/ai#19939` 已经合入并发布。
   
   Upstream / 上游:
   
   - Implementation PR: https://github.com/vercel/ai/pull/19939 — `feat: allow Open Responses extension codecs to explicitly opt in to bare tool, item, and event discriminators`, MERGED on 2026-09-28, closed `vercel/ai#19933`
   - Released in: `@ai-sdk/open-responses@2.0.55`(https://www.npmjs.com/package/@ai-sdk/open-responses/v/2.0.55),当前最新 `2.0.62`
   - New experimental API: `Experimental_OpenResponsesBareExtension`(`allowBareTypes / bareToolType / bareItemTypes / bareEventTypes`)——正是本 PR 等待的、用以承载 Alibaba Token Plan `web_search` / `web_search_call` 等裸 discriminators 的 seam
   
   Note / 说明:
   
   - https://github.com/vercel/ai/issues/19933#issuecomment-5455947268 本身只是 bot 的 Feature Analysis(当时结论为 "Feature is not available"),真正的实现是同线程后续 bot 开出的 #19939,请以 #19939 的合入与 2.0.55 发布为准。
   - Maka `main` 侧已跟进:`packages/runtime/package.json` 已 pin `@ai-sdk/open-responses@2.0.56`,`packages/runtime/src/deepseek-web-search-codec.ts` 已在用 `Experimental_OpenResponsesBareExtension`,`patches/` 下已无 `open-responses` patch。
   
   Suggested next step for this PR / 对本 PR 的后续建议:rebase 到当前 `main` 后,按本 PR 原先约定的 delete-on-release 规则删掉 `patches/@ai-sdk+open-responses+2.0.34.patch`(该分支文件列表里目前还带有它),改用 `2.0.55+` 的 bare-extension codec 实现;注意本 PR 已被标记 stale,rebase 推新 commit 也可顺手解除 stale 计时,跑通后可将 Draft 转 Ready。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #3685: feat(runtime): add Qwen3.8-Max native WebSearch
URL: https://github.com/apache/maka/pull/3685


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-5392283713

   Shared mapper follow-up pushed in `3a74825a9`: Open Responses WebSearch now preserves `search`, `open_page → openPage`, and `find_in_page → findInPage` instead of collapsing every provider action to search. A deterministic raw-SSE contract test pins all three shapes.
   
   DeepSeek capability enablement remains out of this Alibaba PR and is isolated in #3694 / #3689.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-5924410296

   <!-- maka-lifecycle:stale-warning -->
   This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed.
   
   Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the `pinned` label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "MoonOld (via GitHub)" <gi...@apache.org>.
MoonOld commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-5392198065

   Additional live boundary probe on exact head `46e452d32`: the local `DEEPSEEK_API_KEY` was read in process from `/Users/moonold/.env` without printing or persisting it, and a forced provider descriptor was sent through the production `getAIModel` + `ModelAdapter` path to first-party `https://api.deepseek.com/responses` with `deepseek-v4-flash`.
   
   Observed:
   
   - outbound tools: `[{ "type": "web_search" }]`;
   - outcome: `completed`, finish reason `stop`;
   - six provider-executed WebSearch calls;
   - raw provider action types: `search`, `open_page`, and `find_in_page`;
   - the model completed a grounded final answer;
   - usage: 14,514 input / 1,497 output / 810 reasoning / 16,011 total tokens.
   
   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:
   
   1. `resolveHostedWebSearchCapability(deepseek, ...)` still returns `implemented:false`, so normal Maka routing never advertises the tool.
   2. The current narrow mapper is correct for Alibaba `search + sources`, but it rewrites DeepSeek `open_page` and `find_in_page` actions as empty `search` actions, losing their URL/pattern in the normalized tool result.
   
   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] feat(runtime): add Qwen3.8-Max native WebSearch [maka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3685:
URL: https://github.com/apache/maka/pull/3685#issuecomment-6073938961

   <!-- maka-lifecycle:stale-close -->
   This pull request has been closed because it received no new commits during the 7-day grace period. This is not a judgement on the merit of the change; it only keeps the review queue aligned with work that is actively in flight.
   
   The branch and review history are preserved. Push a new commit and reopen the pull request whenever the work is ready to continue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org