fix: accept current vLLM reasoning_effort values - #239
Open
HuXinjing wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟢 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
ReasoningEffortto includenone,minimal,xhigh, andmaxin addition to the existing values. - Update the
ChatCompletionRequestdoc comment forreasoning_effortto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
none,minimal,low,medium,high,xhigh, andmaxMotivation
The router currently rejects
reasoning_effort: "none"during request deserialization with HTTP 422, before the request can reach a vLLM backend. Current vLLM usesnoneto disable thinking for supported models and exposes the expanded set of effort values in its OpenAI-compatible protocol.Validation
cargo fmt --all -- --checkcargo test --test test_openai_routing reasoning_effort_accepts_current_vllm_valuescargo clippy --all-targets --all-features -- -D warningsValidated separately against a vLLM-backed deployment: a Chat Completions request containing
reasoning_effort: "none"returned HTTP 200.