Expand OPENAI_MODELS list with recent OpenAI model names#5172
Open
Cyberfilo wants to merge 1 commit into
Open
Conversation
`OPENAI_MODELS` in `aider/models.py` is used by `sanity_check_models` to map a bare OpenAI model name (no provider prefix) to the `OPENAI_API_KEY` environment variable. Models not in this list fall through to the keymap provider lookup, which fails when the user passes the name without a provider prefix. The list was stale: it had `o1`, `o1-preview`, `o1-mini`, `o3-mini`, the `gpt-4*` family, `gpt-4o*`, `gpt-3.5-*`, plus `gpt-5.5` and `gpt-5.5-pro` — but was missing the entire `o3` / `o3-pro` / `o4-mini` reasoning series, the `gpt-4.1` family (4.1, 4.1-mini, 4.1-nano), and all the `gpt-5` / `gpt-5.1` / `gpt-5.2` / `gpt-5.3` / `gpt-5.4` family variants (chat / pro / mini / nano / codex). All added names already have corresponding entries in `aider/resources/model-settings.yml`, so this list update simply catches up with the rest of the project.
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
`OPENAI_MODELS` in `aider/models.py` is used by `sanity_check_models` to map a bare OpenAI model name (no provider prefix) to the `OPENAI_API_KEY` environment variable. Models not in this list fall through to the keymap provider lookup, which fails when the user passes the name without a provider prefix.
The list was stale: it had `o1`, `o1-preview`, `o1-mini`, `o3-mini`, the `gpt-4*` family, `gpt-4o*`, `gpt-3.5-*`, plus `gpt-5.5` and `gpt-5.5-pro` — but was missing:
All added names already have corresponding entries in `aider/resources/model-settings.yml`, so the list now matches the rest of the project.
Effect
Before this change, a user running `aider --model gpt-5.4-mini` with `OPENAI_API_KEY` set in the environment would see "OPENAI_API_KEY: Not set" because the bare name didn't match the OPENAI_MODELS string list. After this change, the API key is correctly detected.
Test plan