litellm/tests/unit/router_utils/pre_call_checks
yuneng-jiang 1e3641a52a
fix(router): read an application profile's base model from metadata on a cache hit (#47144)
* fix(router): read an application profile's base model from metadata on a cache hit

The 1h prompt-cache pin check read base_model only from the top level of
litellm_params. On a response-cache hit the params it sees carry the base
model only under metadata.model_info, so an application-profile ARN
resolved to itself and the pin was written for 5 minutes while the wire
carried a 1h TTL. Read it through get_base_model_from_metadata, which
also checks metadata.model_info

* test(router): pin top-level base_model precedence over metadata model_info
2026-10-17 14:16:21 -07:00
..
__init__.py test: add __init__.py to new tests/unit packages 2026-09-20 12:36:13 +00:00
test_continuation_prefill_check.py feat(router): mid-stream fallback continuation for chat completions (#41127) 2026-10-16 13:51:32 +00:00
test_deployment_affinity_check.py test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
test_encrypted_content_affinity_check.py fix(router): drop the encrypted reasoning a fallback hop's target cannot decrypt (#45393) 2026-10-08 17:30:01 -07:00
test_prompt_caching_deployment_check.py fix(router): read an application profile's base model from metadata on a cache hit (#47144) 2026-10-17 14:16:21 -07:00
test_responses_api_deployment_check.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_session_id_affinity.py test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00