mirror of
https://github.com/home-assistant/core.git
synced 2026-08-31 18:24:50 -05:00
Update reasoning options for gpt-5.3-codex (#164179)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user