Skip to content

fix(backends): honor enable_thinking=false in sglang and vllm - #11715

Merged
mudler merged 1 commit into
mudler:masterfrom
leilei3167:fix/enable-thinking-false-sglang-vllm
Aug 25, 2026
Merged

fix(backends): honor enable_thinking=false in sglang and vllm#11715
mudler merged 1 commit into
mudler:masterfrom
leilei3167:fix/enable-thinking-false-sglang-vllm

Conversation

@leilei3167

Copy link
Copy Markdown
Contributor

sglang and vllm only forwarded enable_thinking when metadata was "true", so "false" never reached apply_chat_template and Qwen3 kept thinking on. Same coerce as options.go so both values make it through.

Fixes #11674

Those backends only forwarded the flag when it was "true", so "false"
never reached apply_chat_template and Qwen3 kept thinking on.

Signed-off-by: lei_lei <96427312+leilei3167@users.noreply.github.com>
@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

@mudler good to merge. I verified both backend paths now preserve the absent/true/false distinction and pass an actual boolean to apply_chat_template; the SGLang regression test covers true, false, case normalization, and omission. The diff is clean, Python syntax checks pass, and DCO is green. The local SGLang suite could not start in this cron environment because Pillow is not installed (all existing tests hit the same import failure), not because of this change.

@mudler
mudler merged commit a760a7a into mudler:master Aug 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sglang backend: enable_thinking=false is dropped, and reasoning_content stays empty for <think>-prefilled templates

3 participants