Fix blank responses from thinking models - #1365
Conversation
Co-authored-by: Jimmy <1fe240cd1a8cf775f6f3060f115e5a303181f3abf28ad4cb0c2515f4a02b36a8@meshllm.communities.buzz.xyz> Signed-off-by: Jimmy <1fe240cd1a8cf775f6f3060f115e5a303181f3abf28ad4cb0c2515f4a02b36a8@meshllm.communities.buzz.xyz>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe request parser now defaults unspecified chat reasoning formats to ChangesChat reasoning format
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change updates the default reasoning-output behavior while preserving explicitly configured formats, with no actionable merge-blocking risk remaining after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
| chat_template_options(&request, &EmbeddedOpenAiRequestDefaults::default()).unwrap(); | ||
| assert_eq!(options.enable_thinking, Some(false)); | ||
| assert_eq!(options.reasoning_format, Some(ChatReasoningFormat::Hidden)); | ||
| assert_eq!(options.reasoning_format, Some(ChatReasoningFormat::Auto)); |
There was a problem hiding this comment.
big oof, as the kids say
Problem
Thinking models can appear to return a blank response in Mesh. When
reasoning_formatis omitted, Mesh currently parses generated reasoning and then silently discards it. The model is producing tokens and the GPU is working, but clients receive no visible stream while the model is reasoning.This differs from llama-server/LM Studio and from harness expectations, where the default is to pass model reasoning through.
Fix
Default an omitted
reasoning_formattoautoinstead of Mesh'shiddenmode. Reasoning is now streamed to clients asreasoning_content, so the reproduced Qwen3.8 request no longer appears hung or empty.Explicitly configured formats such as
hiddenandnonekeep their existing behavior. This does not change whether a model thinks; it fixes whether generated thinking is silently lost.Validation
cargo fmt --all --checkcargo check -p skippy-servercargo clippy -p skippy-server --all-targets -- -D warningscargo check -p mesh-llmcargo clippy -p mesh-llm --all-targets -- -D warningscargo test -p skippy-server --lib(447 passed, 3 ignored)