From bb15b95cf84294a6ec3800ab27ce124c7e938d8c Mon Sep 17 00:00:00 2001 From: RAJVARDHAN <95933896+vardhans07@users.noreply.github.com> Date: Tue, 15 Sep 2026 19:24:16 +0530 Subject: [PATCH] Implement test for LlmSettings API type Add test for API type override settings in LlmSettings. --- tests/test_models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_models.py b/tests/test_models.py index cd11819a..f8aaf9cc 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -168,3 +168,12 @@ def test_routes_through_litellm_matches_the_provider( while isinstance(model, _NonStreamingModel | _TurnGuardModel): model = model._inner assert isinstance(model, LitellmModel) is litellm + +def test_api_type_override_settings() -> None: + from strix.config.settings import LlmSettings, Settings + from strix.config.models import uses_chat_completions_tool_schema + settings_chat = Settings(llm=LlmSettings(api_type="chat_completions", model="gpt-4")) + assert uses_chat_completions_tool_schema("gpt-4", settings_chat) is True + settings_resp = Settings(llm=LlmSettings(api_type="responses", model="openai/gpt-4")) + assert uses_chat_completions_tool_schema("openai/gpt-4", settings_resp) is False +