mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
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
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:
parent
7a0bee5107
commit
a2d5b60f17
1 changed files with 6 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue