Skip to content

fix: accept current vLLM reasoning_effort values - #239

Open
HuXinjing wants to merge 1 commit into
vllm-project:mainfrom
HuXinjing:fix/current-reasoning-effort-values
Open

fix: accept current vLLM reasoning_effort values#239
HuXinjing wants to merge 1 commit into
vllm-project:mainfrom
HuXinjing:fix/current-reasoning-effort-values

Conversation

@HuXinjing

Copy link
Copy Markdown

Summary

  • accept the reasoning effort values currently supported by vLLM: none, minimal, low, medium, high, xhigh, and max
  • preserve the selected value when forwarding requests
  • cover both Chat Completions and Responses request schemas with serialization round-trip tests

Motivation

The router currently rejects reasoning_effort: "none" during request deserialization with HTTP 422, before the request can reach a vLLM backend. Current vLLM uses none to disable thinking for supported models and exposes the expanded set of effort values in its OpenAI-compatible protocol.

Validation

  • cargo fmt --all -- --check
  • cargo test --test test_openai_routing reasoning_effort_accepts_current_vllm_values
  • cargo clippy --all-targets --all-features -- -D warnings

Validated separately against a vLLM-backed deployment: a Chat Completions request containing reasoning_effort: "none" returned HTTP 200.

Copilot AI 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.

🟢 Approval recommended

The change is a straightforward schema extension with a focused round-trip test covering all newly supported values.

Pull request overview

This PR updates the router’s OpenAI-compatible request/response schemas to accept the full set of reasoning_effort string values currently used by vLLM (including "none"), and adds a serialization round-trip test to ensure the selected value is preserved when forwarding.

Changes:

  • Expand ReasoningEffort to include none, minimal, xhigh, and max in addition to the existing values.
  • Update the ChatCompletionRequest doc comment for reasoning_effort to reflect broader vLLM support.
  • Add an integration test that validates deserialization + re-serialization preserves each supported value for both Chat Completions and Responses reasoning params.
File summaries
File Description
src/protocols/spec.rs Extends ReasoningEffort enum and updates the reasoning_effort field documentation to align with vLLM’s current accepted values.
tests/test_openai_routing.rs Adds a round-trip serialization test to ensure all supported reasoning_effort values are accepted and preserved.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

3 participants