Skip to content

Add 'none' reasoning effort to ChatCompletionRequest#36238

Merged
DarkLight1337 merged 9 commits intovllm-project:mainfrom
juliendenize:add_none_reasoning_effort
Mar 11, 2026
Merged

Add 'none' reasoning effort to ChatCompletionRequest#36238
DarkLight1337 merged 9 commits intovllm-project:mainfrom
juliendenize:add_none_reasoning_effort

Conversation

@juliendenize
Copy link
Copy Markdown
Contributor

@juliendenize juliendenize commented Mar 6, 2026

Purpose

This PR adds support to 'none' reasoning effort.

This is something that is actually supported by the OpenAI client.

It is added to the ChatCompletionRequest but not to harmony.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 6, 2026

Hi @juliendenize, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for 'none' as a value for reasoning_effort. However, the implementation is incomplete and could lead to incorrect behavior. When reasoning_effort is set to 'none', include_reasoning still defaults to True, which should be False. I've left a comment with a suggested fix using a Pydantic validator. Additionally, this change lacks unit tests to verify the new behavior.

Comment thread vllm/entrypoints/openai/chat_completion/protocol.py
@juliendenize juliendenize force-pushed the add_none_reasoning_effort branch from 6a94ce3 to 93352eb Compare March 6, 2026 09:23
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 6, 2026

Hi @juliendenize, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@juliendenize juliendenize force-pushed the add_none_reasoning_effort branch from c120361 to 0f6c53f Compare March 6, 2026 15:35
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 6, 2026

Hi @juliendenize, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
Signed-off-by: Julien Denize <julien.denize@mistral.ai>
Signed-off-by: Julien Denize <julien.denize@mistral.ai>
Signed-off-by: Julien Denize <julien.denize@mistral.ai>
@juliendenize juliendenize force-pushed the add_none_reasoning_effort branch from 0f6c53f to 2f9794b Compare March 6, 2026 17:43
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 10, 2026

Hi @juliendenize, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
@juliendenize juliendenize requested a review from njhill as a code owner March 10, 2026 11:50
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) March 11, 2026 13:18
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 11, 2026
@DarkLight1337 DarkLight1337 merged commit a3ea760 into vllm-project:main Mar 11, 2026
45 checks passed
wendyliu235 pushed a commit to wendyliu235/vllm-public that referenced this pull request Mar 18, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
fxdawnn pushed a commit to fxdawnn/vllm that referenced this pull request Mar 19, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
dubin555 added a commit to dubin555/vllm that referenced this pull request Mar 26, 2026
… crashing

PR vllm-project#36238 added "none" as a valid `reasoning_effort` value for the Chat
Completion API, but the Harmony (GPT-OSS) rendering path was not
updated.  Sending `reasoning_effort="none"` to a Harmony model raises
`ValueError("Harmony does not support reasoning_effort='none'")`,
returning a 500 error to the client.

The root cause is that the `REASONING_EFFORT` lookup dict only maps
"high", "medium", and "low" to Harmony's `ReasoningEffort` enum.
`"none"` (and the Responses API's `"minimal"`) are not in the dict.

Fix:
- In `_make_request_with_harmony`, treat `reasoning_effort="none"` as
  unset (`None`) so the system message omits the reasoning directive.
  The protocol validator already sets `include_reasoning=False`, which
  strips reasoning from both streaming and non-streaming responses.
- In `get_system_message`, guard the dict lookup with an `in` check so
  unsupported effort values are silently ignored rather than raising
  `KeyError`.  This also prevents the same crash for the Responses
  API path where `effort="minimal"` would hit the same dict.

Fixes vllm-project#37909

Signed-off-by: dubin555 <dubin555@gmail.com>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm that referenced this pull request Mar 27, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
vrdn-23 pushed a commit to vrdn-23/vllm that referenced this pull request Mar 30, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
Signed-off-by: Vinay Damodaran <vrdn@hey.com>
EricccYang pushed a commit to EricccYang/vllm that referenced this pull request Apr 1, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
Signed-off-by: EricccYang <yangyang4991@gmail.com>
liuchenbing2026 pushed a commit to liuchenbing2026/vllm that referenced this pull request Apr 4, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
big-yellow-duck pushed a commit to EmbeddedLLM/vllm that referenced this pull request Apr 8, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
mtparet pushed a commit to blackfuel-ai/vllm that referenced this pull request Apr 9, 2026
)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants