Skip to content

Expand OPENAI_MODELS list with recent OpenAI model names#5172

Open
Cyberfilo wants to merge 1 commit into
Aider-AI:mainfrom
Cyberfilo:feat/openai_models-list-completeness
Open

Expand OPENAI_MODELS list with recent OpenAI model names#5172
Cyberfilo wants to merge 1 commit into
Aider-AI:mainfrom
Cyberfilo:feat/openai_models-list-completeness

Conversation

@Cyberfilo
Copy link
Copy Markdown
Contributor

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:

  • The entire `o3` / `o3-pro` / `o4-mini` reasoning series.
  • The `gpt-4.1` family (4.1, 4.1-mini, 4.1-nano).
  • All `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 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

  • `python -c "from aider.models import OPENAI_MODELS; print(len(OPENAI_MODELS), 'o4-mini' in OPENAI_MODELS, 'gpt-5.4-mini' in OPENAI_MODELS, 'gpt-4.1' in OPENAI_MODELS)"` -> `61 True True True`
  • Diff is purely additive: 30 lines added to the OPENAI_MODELS string + 1 line in HISTORY.md.

`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.
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.

1 participant