fix: complete vLLM tool_choice"auto" compatibility fix#3438
Closed
jilin6627-spec wants to merge 14 commits intoagentscope-ai:mainfrom
Closed
fix: complete vLLM tool_choice"auto" compatibility fix#3438jilin6627-spec wants to merge 14 commits intoagentscope-ai:mainfrom
jilin6627-spec wants to merge 14 commits intoagentscope-ai:mainfrom
Conversation
|
Hi @jilin6627-spec, this is your 2nd Pull Request. 📋 About PR TemplateTo help maintainers review your PR faster, please make sure to include:
Complete PR information helps speed up the review process. You can edit the PR description to add these details. 🙌 Join Developer CommunityThanks so much for your contribution! We'd love to invite you to join the official QwenPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page: We truly appreciate your enthusiasm—and look forward to your future contributions! 😊 We'll review your PR soon. |
Member
|
Fixed in #3295 ? |
added 8 commits
April 16, 2026 01:33
…ter parallel debugging
…80MB) to reduce download size
…r download on GitHub runners
Member
|
Closed as invalid |
Contributor
Author
|
#3295 只改了一个文件 (src/qwenpaw/token_usage/model_wrapper.py),但还有另外三个文件也需要修复:
#3295 只修复了一个文件。#3295 只修复了 model_wrapper.py,但还有三个调用路径没有修复:
1. token_usage/model_wrapper.py - ✅ #3295 已修复
2. agents/react_agent.py (QwenPawAgent._reasoning) - ❌ 未修复
3. agents/tool_guard_mixin.py (_reasoning) - ❌ 未修复
4. agents/routing_chat_model.py (endpoint.model) - ❌ 未修复
我们的 PR #3438 补全了剩下三个文件的修复,这才是完整的。误以为全部修好了,但实际上只修了一处。
…On Thu, Apr 16, 2026 at 7:10 PM Yuexiang XIE ***@***.***> wrote:
*xieyxclack* left a comment (agentscope-ai/QwenPaw#3438)
<#3438 (comment)>
Closed as invalid
—
Reply to this email directly, view it on GitHub
<#3438 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CABG3ARYOEEEBWF6NLYOOJ34WC5STAVCNFSM6AAAAACX2BSJPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENJZGU2DGNBZGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fix: complete vLLM tool_choice="auto" compatibility fix
Problem
vLLM OpenAI-compatible server returns 400 error when receiving
tool_choice="auto", unless the server was started with--enable-auto-tool-choice --tool-call-parser <...>.Original PR only fixed
TokenRecordingModelWrapper, but there are three more code paths that still pass throughtool_choice="auto"to the model client:QwenPawReactAgent._reasoning()insrc/qwenpaw/agents/react_agent.pyToolGuardMixin._reasoning()insrc/qwenpaw/agents/tool_guard_mixin.pyRoutingChatModel.__call__()insrc/qwenpaw/agents/routing_chat_model.pyThis causes the 400 error even with the original fix applied, because
tool_choice="auto"still reaches the vLLM server through these other paths.Solution
Apply the same fix to all three paths: when
tool_choice == "auto", set it toNonebefore passing to the underlying model client. This matches what was already done inTokenRecordingModelWrapper.Testing
--enable-auto-tool-choice