mirror of
https://github.com/kvcache-ai/sglang.git
synced 2026-11-05 01:07:39 +00:00
[PR #52] [CLOSED] fix(parser): align reasoning & tool-call parsers with upstream sglang #52
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/sglang#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/sglang/pull/52
Author: @yyj6666667
Created: 5/30/2026
Status: ❌ Closed
Base:
main← Head:fix/align-reasoning-parser-upstream📝 Commits (3)
5a0324afix(reasoning): align reasoning parser with upstream sglang797b177fix(tool-call): restore deepseekv4 tool-call-parser registration1351a10fix(tool-call): sync kimi_k2 tool-call detector with upstream📊 Changes
4 files changed (+424 additions, -56 deletions)
View changed files
📝
python/sglang/srt/entrypoints/openai/serving_chat.py(+20 -5)📝
python/sglang/srt/function_call/function_call_parser.py(+2 -0)📝
python/sglang/srt/function_call/kimik2_detector.py(+140 -37)📝
python/sglang/srt/parser/reasoning_parser.py(+262 -14)📄 Description
Summary
reasoning_parser.pywith upstream — addKimiK2Detector(tool-call mid-reasoning interruption),Glm45Detector,MistralDetector,HunyuanDetector,Gemma4Detector,Nemotron3Detector,_DeepSeekV3Detector,_MimoDetector,_PoolsideV1Detector; fix DetectorMap mappings (kimi_k2,glm45,deepseek-v3/v4etc.); addtool_start_token/thinks_internally/reasoning_defaultto base classdeepseekv4tool-call-parser registration — PR #47 removed it fromToolCallParserEnumduring DSV4 plugin isolation; the detector file still exists, just needs re-registrationkimik2_detector.py(tool-call) with upstream — support bare counter tool_call_id, infer function name from argument keys, fix_last_argumentsaccumulating<|tool_call_end|>marker, strip residual special tokens on parse errorTest plan
ReasoningParser('kimi_k2')resolves toKimiK2Detectorwith correcttool_start_token--tool-call-parser kimi_k2 --reasoning-parser kimi_k2: tool calling works correctly (reasoning_content and tool_calls properly separated)--tool-call-parser deepseekv4🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.