litellm/tests/test_litellm/router_utils/pre_call_checks
Tin Chi Lo fc5848174e fix(router): take the lowest minimum across a model group, not the highest
The read gate cannot cause a wrong pin. A deployment is only pinned when the cache
already holds an entry for the prefix, and async_log_success_event writes entries
against the deployment's real model rather than the group alias, so a model that
will not cache a prefix never records one and there is nothing to pin it to

That makes this gate purely a cheap short-circuit deciding whether the cache lookup
is worth doing, so the threshold must be the lowest minimum in the group. Taking the
highest skipped the lookup for a prefix a lower-minimum member had genuinely cached,
losing a hit it earned, and protected against nothing. It also broke the Fable 5
direction this ticket is meant to fix: its real minimum is 512, so a group gate stuck
at a higher value would skip the lookup for a prefix Fable 5 had actually cached
2026-07-16 19:53:10 -07:00
..
test_deployment_affinity_check.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_encrypted_content_affinity_check.py Litellm oss 090626 (#30021) 2026-06-10 10:34:07 -07:00
test_prompt_caching_deployment_check.py fix(router): take the lowest minimum across a model group, not the highest 2026-07-16 19:53:10 -07:00
test_responses_api_deployment_check.py Add LLM provider response headers to Responses API (#16091) 2025-11-01 13:25:56 -07:00
test_session_id_affinity.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00