mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
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:
parent
41de0bb78c
commit
0fabfb5745
2 changed files with 18 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue