diff --git a/custom_components/configurable_llm/const.py b/custom_components/configurable_llm/const.py index 99ec8cc..10207c6 100644 --- a/custom_components/configurable_llm/const.py +++ b/custom_components/configurable_llm/const.py @@ -26,7 +26,7 @@ # `reasoning_effort` choices offered for OpenAI-compatible providers. Servers and # models vary in what they accept; "none" means "do not send the parameter". -REASONING_EFFORT_OPTIONS = ["none", "low", "medium", "high"] +REASONING_EFFORT_OPTIONS = ["none", "minimal", "low", "medium", "high"] CONF_WEB_FETCH_MAX_USES = "web_fetch_max_uses" CONF_WEB_SEARCH = "web_search" diff --git a/custom_components/configurable_llm/strings.json b/custom_components/configurable_llm/strings.json index 7bf7453..3727e94 100644 --- a/custom_components/configurable_llm/strings.json +++ b/custom_components/configurable_llm/strings.json @@ -245,6 +245,7 @@ "reasoning_effort": { "options": { "none": "Default (none)", + "minimal": "Minimal", "low": "Low", "medium": "Medium", "high": "High" diff --git a/custom_components/configurable_llm/translations/en.json b/custom_components/configurable_llm/translations/en.json index 7bf7453..3727e94 100644 --- a/custom_components/configurable_llm/translations/en.json +++ b/custom_components/configurable_llm/translations/en.json @@ -245,6 +245,7 @@ "reasoning_effort": { "options": { "none": "Default (none)", + "minimal": "Minimal", "low": "Low", "medium": "Medium", "high": "High" diff --git a/tests/providers/test_openai_chat_provider.py b/tests/providers/test_openai_chat_provider.py index 9a085a1..66eba1b 100644 --- a/tests/providers/test_openai_chat_provider.py +++ b/tests/providers/test_openai_chat_provider.py @@ -409,6 +409,14 @@ async def test_build_request_sampling_params(hass: HomeAssistant) -> None: assert "reasoning_effort" not in request +async def test_build_request_reasoning_effort_minimal(hass: HomeAssistant) -> None: + """'minimal' effort is forwarded verbatim, not treated like 'none'.""" + options = {**DEFAULT_OPENAI, CONF_REASONING_EFFORT: "minimal"} + request, _ = await provider.build_request(_ctx(options=options)) + + assert request["reasoning_effort"] == "minimal" + + async def test_build_request_tools(hass: HomeAssistant) -> None: """HA tools become Chat Completions function tools.""" request, _ = await provider.build_request(_ctx(with_tools=True))