From aea92299f4df38b0d2e8885f196f0f21b556d43e Mon Sep 17 00:00:00 2001 From: tin Date: Thu, 30 Jul 2026 05:38:11 +0000 Subject: [PATCH] test(complexity_router): derive the warm-pick record key from the shared caller scope Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/test_litellm/router_strategy/test_complexity_router.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/router_strategy/test_complexity_router.py b/tests/test_litellm/router_strategy/test_complexity_router.py index c3598e8f408..ac2ae8688bc 100644 --- a/tests/test_litellm/router_strategy/test_complexity_router.py +++ b/tests/test_litellm/router_strategy/test_complexity_router.py @@ -4218,6 +4218,7 @@ class TestWarmAwarePick: import json import time as time_module + from litellm.litellm_core_utils.core_helpers import get_caller_scope from litellm.router_strategy.complexity_router.cache_warming.store import CacheWarmingStore from litellm.router_strategy.complexity_router.cache_warming.types import ( CACHE_WARMING_RECORD_SCHEMA_VERSION, @@ -4245,7 +4246,7 @@ class TestWarmAwarePick: auto_router_model_name="warm-router", ) store = CacheWarmingStore(redis_cache=redis, auto_router_model_name="warm-router") - key = store.record_key("warm-router", "hash-w", "warm-sess") + key = store.record_key("warm-router", get_caller_scope(TestWarmAwarePick._kwargs()), "warm-sess") redis.hashes.setdefault(store.sessions_key(), {})[key] = json.dumps(record.model_dump()) for model_group, stamp in warmth.items(): redis.data[CacheWarmingStore.warmth_key(key, model_group)] = json.dumps(