fix(openai): correct `reasoning_effort_levels` for gpt-5 and gpt-5.1 profiles (#39936)
Fixes #39935 --- `gpt-5`, `gpt-5-mini`, `gpt-5-nano` and `gpt-5.1` no longer advertise a reasoning effort level they reject, and the GPT-5 models advertise `minimal` again. The profile augmentations currently give all four models `["none", "low", "medium", "high", "xhigh"]`. OpenAI's [GPT-5 model page](https://developers.openai.com/api/docs/models/gpt-5) states that effort supports "minimal, low, medium, and high", and the [GPT-5.1 page](https://developers.openai.com/api/docs/models/gpt-5.1) lists "none (default), low, medium, and high". `xhigh` arrived later, with GPT-5.1-Codex-Max. A client that reads `profile["reasoning_effort_levels"]` to build its settings therefore offers `xhigh` on models that reject it, and hides `minimal`, which GPT-5 accepts. The corrected values match the models.dev entries for the same models. The `gpt-5.2` / `gpt-5.4` / `gpt-5.6` profiles are already correct and are untouched. A few other entries (`gpt-5-pro`, `gpt-5.2-pro`, `gpt-5.4-pro`, `gpt-5.2-chat-latest`) also differ from models.dev, but I could not confirm those from OpenAI's own docs, so I left them alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Mason Daugherty <mason@langchain.dev>
L
Lukáš Kožušník committed
c253f54b905f9648c50b723f01945f39a256d8aa
Parent: 513e425
Committed by GitHub <noreply@github.com>
on 8/27/2026, 2:37:42 PM