mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
test(model-registry): verify gpt-5.4 supports_web_search in model_info
This commit is contained in:
parent
b60271a271
commit
0c47042df3
1 changed files with 36 additions and 0 deletions
|
|
@ -0,0 +1,36 @@
|
|||
"""Verify gpt-5.4 models expose supports_web_search in model_info."""
|
||||
|
||||
import pytest
|
||||
|
||||
import litellm
|
||||
from litellm.litellm_core_utils.get_model_cost_map import get_model_cost_map
|
||||
from litellm.utils import get_model_info
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def use_local_model_cost_map(monkeypatch: pytest.MonkeyPatch):
|
||||
monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
|
||||
monkeypatch.setattr(
|
||||
litellm, "model_cost", get_model_cost_map(url=litellm.model_cost_map_url)
|
||||
)
|
||||
litellm.add_known_models(model_cost_map=litellm.model_cost)
|
||||
|
||||
|
||||
class TestGPT54WebSearch:
|
||||
"""gpt-5.4 variants must have supports_web_search=True."""
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"model",
|
||||
[
|
||||
"gpt-5.4",
|
||||
"gpt-5.4-2026-03-05",
|
||||
"azure/gpt-5.4",
|
||||
"azure/gpt-5.4-2026-03-05",
|
||||
],
|
||||
)
|
||||
def test_supports_web_search(self, model: str):
|
||||
info = get_model_info(model)
|
||||
assert info is not None, f"get_model_info returned None for {model}"
|
||||
assert (
|
||||
info["supports_web_search"] is True
|
||||
), f"{model} should have supports_web_search=True"
|
||||
Loading…
Add table
Reference in a new issue