test(deepseek): use bundled cost map for capability assertions

The DeepSeek capability tests resolve supports_response_schema against the
cost map fetched from main at import time, which still reports True for
DeepSeek until this branch merges. Pin the bundle via the existing
local_model_cost_map fixture and import supports_response_schema so the
API-level assertions run offline and deterministically.
This commit is contained in:
Alex Talmaciu 2026-09-18 17:51:04 +03:00
parent 41de0bb78c
commit 0fabfb5745
2 changed files with 18 additions and 0 deletions

View file

@ -10,6 +10,13 @@ from litellm.types.utils import ModelResponse
from litellm.utils import get_optional_params
@pytest.fixture(autouse=True)
def _use_local_cost_map(local_model_cost_map):
"""Force the bundled in-repo cost map so DeepSeek capability checks resolve
against this branch instead of the network-fetched ``main`` copy, which still
reports ``supports_response_schema=True`` for DeepSeek."""
def _function_tool(name: str) -> dict:
return {
"type": "function",

View file

@ -12,11 +12,22 @@ field set to ``True``.
import json
import os
import pytest
import litellm
from litellm.utils import (
_supports_factory,
supports_response_schema,
)
@pytest.fixture(autouse=True)
def _use_local_cost_map(local_model_cost_map):
"""Force the bundled in-repo cost map so the API-level assertions do not
depend on the network-fetched ``main`` copy, which still carries
``supports_response_schema=True`` until this branch merges."""
# ---------------------------------------------------------------------------
# Data-level tests – verify the JSON files are in sync
# ---------------------------------------------------------------------------