From 0fabfb5745d056bd34ff8a75117d7d6caad8d36c Mon Sep 17 00:00:00 2001 From: Alex Talmaciu Date: Fri, 18 Sep 2026 17:51:04 +0300 Subject: [PATCH] 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. --- .../chat/test_deepseek_chat_transformation.py | 7 +++++++ tests/test_litellm/test_deepseek_model_metadata.py | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/tests/test_litellm/llms/deepseek/chat/test_deepseek_chat_transformation.py b/tests/test_litellm/llms/deepseek/chat/test_deepseek_chat_transformation.py index c7b15052024..3612eb41e76 100644 --- a/tests/test_litellm/llms/deepseek/chat/test_deepseek_chat_transformation.py +++ b/tests/test_litellm/llms/deepseek/chat/test_deepseek_chat_transformation.py @@ -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", diff --git a/tests/test_litellm/test_deepseek_model_metadata.py b/tests/test_litellm/test_deepseek_model_metadata.py index e174aebc581..a069140af9a 100644 --- a/tests/test_litellm/test_deepseek_model_metadata.py +++ b/tests/test_litellm/test_deepseek_model_metadata.py @@ -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 # ---------------------------------------------------------------------------