Update reasoning options for gpt-5.3-codex (#164179)

This commit is contained in:
Denis Shulyaka
2026-02-26 19:31:45 +00:00
committed by Franck Nijhof
parent a598368895
commit 60c8d997ca
2 changed files with 4 additions and 3 deletions
@@ -539,15 +539,15 @@ class OpenAISubentryFlowHandler(ConfigSubentryFlow):
if not model.startswith(("o", "gpt-5")) or model.startswith("gpt-5-pro"):
return []
MODELS_REASONING_MAP = {
models_reasoning_map: dict[str | tuple[str, ...], list[str]] = {
"gpt-5.2-pro": ["medium", "high", "xhigh"],
"gpt-5.2": ["none", "low", "medium", "high", "xhigh"],
("gpt-5.2", "gpt-5.3"): ["none", "low", "medium", "high", "xhigh"],
"gpt-5.1": ["none", "low", "medium", "high"],
"gpt-5": ["minimal", "low", "medium", "high"],
"": ["low", "medium", "high"], # The default case
}
for prefix, options in MODELS_REASONING_MAP.items():
for prefix, options in models_reasoning_map.items():
if model.startswith(prefix):
return options
return [] # pragma: no cover
@@ -267,6 +267,7 @@ async def test_subentry_unsupported_model(
("gpt-5.1", ["none", "low", "medium", "high"]),
("gpt-5.2", ["none", "low", "medium", "high", "xhigh"]),
("gpt-5.2-pro", ["medium", "high", "xhigh"]),
("gpt-5.3-codex", ["none", "low", "medium", "high", "xhigh"]),
],
)
async def test_subentry_reasoning_effort_list(