From 8218a103a3414a2945773fc8c326fbc75837d45c Mon Sep 17 00:00:00 2001 From: 9qeklajc Date: Sun, 16 Aug 2026 21:06:25 +0200 Subject: [PATCH] test: register DeepSeek V4 pricing shim in cache pricing tests --- tests/unit/test_cache_pricing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/unit/test_cache_pricing.py b/tests/unit/test_cache_pricing.py index cfb7e9a6..cc4a4dbc 100644 --- a/tests/unit/test_cache_pricing.py +++ b/tests/unit/test_cache_pricing.py @@ -31,6 +31,15 @@ from routstr.payment.models import ( backfill_cache_pricing, ) from routstr.upstream import GenericUpstreamProvider +from routstr.upstream.deepseek_v4_pricing_shim import register_deepseek_v4_pricing + + +@pytest.fixture(autouse=True) +def _deepseek_v4_pricing() -> None: + # litellm's bundled cost map lacks the DeepSeek V4 entries (they only + # appear when its remote map is reachable); production injects them at + # startup via this same shim. + register_deepseek_v4_pricing() def _make_model(model_id: str, pricing: Pricing) -> Model: