Repository navigation
fix: forward reasoning_effort to zhipu upstream - #7124
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe Zhipu request conversion now propagates ChangesZhipu request conversion
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change forwards the requested reasoning effort to the upstream provider so low-effort requests are honored; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Upstream: QuantumNous@3e8c358 Co-Authored-By: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 3e8c358)
🚀 变更类型 / Type of change
📝 变更描述 / Description
requestOpenAI2Zhipu用字段白名单重建上游请求,reasoning_effort不在名单里,被静默丢弃。按智谱文档,glm-5.3 / glm-5.3-flash 的 thinking 强制开启(
disabled无效),思考强度只能靠reasoning_effort控制,默认max。参数被丢的结果是:客户端传low也按max思考,复杂 agent 请求动辄思考十几分钟,极端情况max_tokens全被 reasoning 吃掉,finish_reason=length,正文为空但照常计费。修复就一行:白名单补
ReasoningEffort。📸 运行证明 / Proof of Work
线上真实用户请求(12,653 prompt tokens + 22 个 function tools,
reasoning_effort: "low")修复前后 A/B:触发排查的原始案例:同场景请求思考 15 分钟,32,000 completion tokens 里 31,844 个是 reasoning,
finish_reason=length,content为空。✅ 提交前检查项 / Checklist
New feature,我已关联对应 Issue;若尚无 Issue,我已先自行创建。Summary by CodeRabbit