Skip to content

feat: Add 'none' reasoning effort to ChatCompletionRequest#20556

Merged
hnyls2002 merged 1 commit intosgl-project:mainfrom
Javtor:add-none-reasoning-effort
Mar 16, 2026
Merged

feat: Add 'none' reasoning effort to ChatCompletionRequest#20556
hnyls2002 merged 1 commit intosgl-project:mainfrom
Javtor:add-none-reasoning-effort

Conversation

@Javtor
Copy link
Copy Markdown
Contributor

@Javtor Javtor commented Mar 13, 2026

Motivation

The OpenAI Python SDK's ReasoningEffort type includes "none" (source), and vLLM recently added support for it (vllm#36238). SGLang currently only accepts "low", "medium", "high".

This is useful for models like Qwen3.5 that have built-in reasoning, so callers can disable thinking per-request via reasoning_effort: "none" without requiring engine-level configuration like --default-chat-template-kwargs '{"enable_thinking": false}'.

Modifications

protocol.py:

  • Add "none" to reasoning_effort Literal type and normalize_reasoning_inputs validator
  • When reasoning_effort="none", default thinking and enable_thinking to False in chat_template_kwargs via setdefault (user-provided values take precedence)

serving_chat.py:

  • Reject reasoning_effort="none" in the harmony (GPT-OSS) path with ValueError

test_protocol.py:

  • Add tests for reasoning_effort="none" via top-level param and nested reasoning dict

Checklist

Review Process

  1. Ping Merge Oncalls to start the PR flow. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • /tag-run-ci-label, /rerun-failed-ci, /tag-and-rerun-ci
  4. After green CI and required approvals, ask Merge Oncalls to merge.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Javtor Javtor force-pushed the add-none-reasoning-effort branch from b35dbb2 to 3e344d0 Compare March 13, 2026 23:36
Add support for reasoning_effort='none' in the chat completions API,
matching the OpenAI Python SDK's ReasoningEffort type which includes
'none' (see openai-python: types/shared/reasoning_effort.py).

When reasoning_effort='none':
- Defaults thinking and enable_thinking to false in chat_template_kwargs
  (respects explicit user overrides via setdefault)
- Harmony (GPT-OSS) path raises ValueError (not supported)

This is useful for models like Qwen3.5 that have built-in reasoning
but where callers want direct output without thinking tokens.
@Javtor Javtor force-pushed the add-none-reasoning-effort branch from 3e344d0 to ec2a77f Compare March 13, 2026 23:36
@Javtor Javtor changed the title Add none reasoning effort feat: Add 'none' reasoning effort to ChatCompletionRequest Mar 13, 2026
Copy link
Copy Markdown
Collaborator

@hnyls2002 hnyls2002 left a comment

Choose a reason for hiding this comment

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

LGTM.

@hnyls2002
Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@hnyls2002
Copy link
Copy Markdown
Collaborator

All hit tests pass locally.

@hnyls2002 hnyls2002 merged commit afc71ba into sgl-project:main Mar 16, 2026
95 of 142 checks passed
Wangzheee pushed a commit to Wangzheee/sglang that referenced this pull request Mar 21, 2026
JustinTong0323 pushed a commit to JustinTong0323/sglang that referenced this pull request Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants