Skip to content

fix: suppress unsupported temperature for Codex mini#5349

Open
rodboev wants to merge 1 commit into
Aider-AI:mainfrom
rodboev:pr/codex-mini-temperature
Open

fix: suppress unsupported temperature for Codex mini#5349
rodboev wants to merge 1 commit into
Aider-AI:mainfrom
rodboev:pr/codex-mini-temperature

Conversation

@rodboev

@rodboev rodboev commented Jun 29, 2026

Copy link
Copy Markdown

Codex mini models routed through LiteLLM can reject the temperature parameter. Aider already has a per-model use_temperature setting, but Codex mini currently falls through with the default request shape and sends temperature=0.

This uses the existing model-setting path to mark Codex mini as use_temperature=False, while leaving the centralized send_completion() request builder and normal temperature behavior intact.

Closes #4039

The follow-up question from coogle shaped 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 -v
  • rtk pre-commit run --all-files

Latest 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 -v
    • Passed (2/2). Both plain and provider-prefixed Codex mini variants still resolve use_temperature=False and omit temperature in send_completion.
  • rtk python -m pytest tests/basic/test_models.py -v
    • Failed in this environment. litellm import crashes during aider.llm lazy load with AttributeError: module aiohttp has no attribute ConnectionTimeoutError, which affects existing constructor-heavy tests outside this change.
  • rtk pre-commit run --all-files
    • Initially failed because black reformatted tests/basic/test_models.py.
    • Re-run passed after formatting.

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.

Codex-mini don't work with litellm

1 participant