Repository navigation
fix(inference): Drop the sampling params gpt-6 rejects while it reasons - #8001
Merged
Merged
Conversation
drop_unsupported_params covered the o-series and gpt-5 prefixes but not gpt-6, so a caller setting temperature on openai/gpt-6.1-sol got the API's 400 back: the model has no "none" reasoning effort, and it rejects a non-default temperature at every effort it does support. Add the gpt-6 prefix with the set the API rejects while reasoning — temperature, top_p, presence_penalty, frequency_penalty, logit_bias, logprobs, top_logprobs, stop — all of which it accepts again at effort "none". Probed against the API on 2026-10-20 on gpt-6.1-sol (chat and responses transports), gpt-6-sol and gpt-6-luna. n and seed are accepted at any effort, so neither joins the set. The gpt-5 carve-out generalizes to a per-prefix map of the params kept at effort "none", which leaves gpt-5 behavior as it was.
The set comment named only the removal of n; stop is an addition to the gpt-5 shape and seed is in neither, so say all three. Spell out that _KEPT_AT_EFFORT_NONE mirrors the prefixes of _UNSUPPORTED_PARAMS and that those sets are read-only. Pin the two new _MIN_REASONING_EFFORT entries in test_min_reasoning_effort_mapping, which is the second consumer: JudgeGroup sends the lowest effort the model supports, so a judge on gpt-6-sol now sends reasoning_effort "none" where it previously sent none.
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
shawnfeldman
left a comment
Contributor
There was a problem hiding this comment.
review-pr found no issues · medium risk (livekit-agents/livekit/agents/inference/llm.py, default rules: Medium)
Approval: 1 person besides the author. The repo has no PR template sign-off box, so automated approval cannot apply. An agent's approval does not count.
tinalenguyen
approved these changes
Oct 21, 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.
Summary
drop_unsupported_paramscovered the o-series andgpt-5prefixes but notgpt-6, so a caller settingtemperatureonopenai/gpt-6.1-solhad it forwarded and the API answered 400. The model has no"none"reasoning effort, so a non-defaulttemperaturecannot be accepted at any effort it does support.gpt-6prefix with the params the API rejects while reasoning —temperature,top_p,presence_penalty,frequency_penalty,logit_bias,logprobs,top_logprobs,stop— all of which it accepts again at effort"none".nandseedare accepted while reasoning, so neither joins the set.stopis new relative to the o-series/gpt-5 set;nis dropped from it."none", which leaves gpt-5 behavior byte-identical.Probed against
api.openai.comon 2026-10-20 ongpt-6.1-sol(chat and responses transports),gpt-6-solandgpt-6-luna.Testing
tests/test_drop_unsupported_params.py: new cases forgpt-6.1-sol(every param stripped, stripped when the effort is omitted,n/seedkept, stripped even when the caller asks for"none"),gpt-6-sol/gpt-6-lunaat"none", and both transports' effort shapes.tests/test_judge.py: pins the two new_MIN_REASONING_EFFORTentries.ruff check --fixandruff formatwere not available here either, so CI's lint step should be checked.Risk
_MIN_REASONING_EFFORThas a second consumer:JudgeGroupsends the lowest effort a model supports, so a judge ongpt-6-solnow sendsreasoning_effort: "none"where it previously sent none — which is what its docstring promises, but it is a behavior change for judges.openaichat plugin (livekit-plugins-openai/.../llm.py) forwardstemperatureunconditionally and does not use this helper, so a BYOK caller on the chat path still 400s; the tool-incompatible prefix set still lists onlygpt-5.2/gpt-5.4and has not been probed for gpt-6; the gateway coerces an effort the model does not have (that is what the strip relies on forgpt-6.1-solwith a client-sent"none").