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 +