Repository navigation
fix(vlm): default affected GPT tool calls to no reasoning - #6137
Merged
Merged
Conversation
Avoid invalid Chat Completions requests by selecting none for affected models when tools are present. Preserve explicit settings and Codex defaults. Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
qin-ctx
approved these changes
Oct 15, 2026
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.
Description
Session commits using
gpt-6-lunacan fail when Chat Completions receives function tools with the automatically selectedreasoning_effort: "low".For the same
gpt-6-lunarequest with tools and no explicit reasoning setting, the default changes fromreasoning_effort: "low"toreasoning_effort: "none". This applies to GPT-5.4/5.5/5.6 and GPT-6 Sol/Luna aliases and snapshots. Requests without tools and theopenai-codexResponses path retain their existing defaults. Explicitreasoning_effortandextra_request_bodysettings retain their existing precedence.Human Involvement
Related Issue
Fixes #5757
Related: #5762
Type of Change
Changes Made
noneby default for affected Chat Completions tool requests, excludingopenai-codex.Testing
Existing reasoning, extra-body, Codex, response-format, and thinking tests: 112 passed, 1 pre-existing failure.
test_openai_async_completion_with_empty_tools_preserves_usagealso fails against the unmodified backend because its expected usage dictionary omitscompletion_tokens_details.Offline A/B check confirms the default
gpt-6-lunatool request changes fromlowtonone.HTTP mock transport verified 56 actual OpenAI SDK request bodies across synchronous/asynchronous text and vision calls, including explicit configuration and unaffected-model controls. Codex Responses controls retained
low.Ruff lint/format checks and
git diff --checkpassed.I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
I have tested this on the following platforms:
Checklist
Screenshots (if applicable)
Not applicable.
Additional Notes
This changes automatic defaults only. An explicitly configured non-
noneeffort can still be rejected by an affected Chat Completions endpoint. GPT-6 Astra and GPT-6.1 Sol require Responses for tool calling and are outside this fix.