Skip to content

feat: Support deployment-level thinking defaults for chat templates (… - #12440

Merged
pvijayakrish merged 1 commit into
release/1.4.0from
ibhosale/deployment-cp
Jul 30, 2026
Merged

feat: Support deployment-level thinking defaults for chat templates (…#12440
pvijayakrish merged 1 commit into
release/1.4.0from
ibhosale/deployment-cp

Conversation

@indrajit96

@indrajit96 indrajit96 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

CP for #11047


Open in Devin Review

…11047)

Signed-off-by: Indrajit Bhosale <iamindrajitb@gmail.com>
@indrajit96
indrajit96 requested review from a team as code owners July 30, 2026 20:53
@github-actions github-actions Bot added feat documentation Improvements or additions to documentation backend::vllm Relates to the vllm backend backend::sglang Relates to the sglang backend backend::trtllm Relates to the trtllm backend frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` labels Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines 160 to 167
}
OpenAiThinkingMode::Disabled => {
args.insert("thinking".to_string(), serde_json::Value::Bool(false));
args.insert(
"enable_thinking".to_string(),
serde_json::Value::Bool(false),
);
args.insert(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Adding enable_thinking to normalized thinking payloads changes rendered prompts for existing deployments

normalize_reasoning_template_args now writes enable_thinking in addition to thinking/thinking_mode for the enabled/disabled cases. Two consequences worth confirming against expectations:

  1. Templates that key on enable_thinking (Qwen3, GLM, Gemma4, ...) will now honor a client's thinking: {"type": ...} payload; previously they saw only thinking, so the same request rendered differently. This is a behavior change for any live deployment already sending root-level thinking.
  2. Precedence flips for a conflicting request: with thinking:{"type":"enabled"} + reasoning_effort:"none", the reasoning-effort branch at lib/llm/src/protocols/openai/chat_completions.rs:176-179 previously seeded enable_thinking=false via entry(...).or_insert(...); it now cannot, because the explicit insert already ran, so enable_thinking stays true. Conversely thinking:{"type":"disabled"} now also forces enable_thinking=false over a client-supplied chat_template_kwargs.enable_thinking=true (previously left intact, producing contradictory kwargs). Both directions look intentional per the new tests, but they are not mentioned in the PR description.

(Refers to lines 154-167)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@datadog-official

This comment has been minimized.

@pvijayakrish
pvijayakrish merged commit c45700e into release/1.4.0 Jul 30, 2026
115 checks passed
@pvijayakrish
pvijayakrish deleted the ibhosale/deployment-cp branch July 30, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend::sglang Relates to the sglang backend backend::trtllm Relates to the trtllm backend backend::vllm Relates to the vllm backend documentation Improvements or additions to documentation feat frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants