Fix model arg for compact request (#29091)
Some checks failed
Unit Tests: Caching (Redis) / caching-redis (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled

This commit is contained in:
JT 2026-05-27 17:17:14 -07:00 committed by GitHub
parent 7a0bee5107
commit a2d5b60f17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,9 +119,14 @@ class LiteLLMCompletionTransformationHandler:
# breakpoint()
compacted = False
if context_management:
model = litellm_completion_request.get("model", "")
provider = litellm_completion_request.get("custom_llm_provider", "")
if provider:
model = provider + "/" + model
litellm_completion_request["messages"], compacted = (
await LiteLLMCompletionResponsesConfig._transform_context_management(
model=litellm_completion_request.get("model", ""),
model=model,
input=litellm_completion_request.get("messages", []),
context_management=context_management,
**kwargs,