fix: suppress unsupported temperature for Codex mini#5349
Open
rodboev wants to merge 1 commit into
Open
Conversation
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.
Codex mini models routed through LiteLLM can reject the
temperatureparameter. Aider already has a per-modeluse_temperaturesetting, but Codex mini currently falls through with the default request shape and sendstemperature=0.This uses the existing model-setting path to mark Codex mini as
use_temperature=False, while leaving the centralizedsend_completion()request builder and normal temperature behavior intact.Closes #4039
The follow-up question from
coogleshaped the scope here: disable unsupported LiteLLM parameters for affected models without changing unrelated request construction.Tests:
rtk python -m pytest tests/basic/test_models.py -vrtk pre-commit run --all-filesLatest checks:
rtk python -m pytest tests/basic/test_models.py::TestModels::test_codex_mini_send_completion_omits_temperature tests/basic/test_models.py::TestModels::test_codex_mini_sets_use_temperature_false -vuse_temperature=Falseand omittemperatureinsend_completion.rtk python -m pytest tests/basic/test_models.py -vlitellmimport crashes duringaider.llmlazy load withAttributeError: module aiohttp has no attribute ConnectionTimeoutError, which affects existing constructor-heavy tests outside this change.rtk pre-commit run --all-filesblackreformattedtests/basic/test_models.py.