diff --git a/homeassistant/components/openai_conversation/config_flow.py b/homeassistant/components/openai_conversation/config_flow.py index 07f26771dcbb..326b2f91f380 100644 --- a/homeassistant/components/openai_conversation/config_flow.py +++ b/homeassistant/components/openai_conversation/config_flow.py @@ -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 diff --git a/tests/components/openai_conversation/test_config_flow.py b/tests/components/openai_conversation/test_config_flow.py index a2bdaed9f159..48d7a9dd6578 100644 --- a/tests/components/openai_conversation/test_config_flow.py +++ b/tests/components/openai_conversation/test_config_flow.py @@ -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(