mirror of
https://github.com/usestrix/strix.git
synced 2026-10-13 03:57:59 +00:00
Implement test for LlmSettings API type
Add test for API type override settings in LlmSettings.
This commit is contained in:
parent
9585cea6d0
commit
bb15b95cf8
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue