mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-01 02:02:20 +00:00
fix(anthropic/messages): check per-request drop_params alongside global
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1b3570f974
commit
f85ca2d502
1 changed files with 2 additions and 1 deletions
|
|
@ -461,8 +461,9 @@ def anthropic_messages_handler(
|
|||
# In-gateway context_management polyfill on the chat-completions adapter
|
||||
# (native on Anthropic/Responses paths). Skipped when drop_params is on.
|
||||
context_management_spec = _shared_kwargs.pop("context_management", None)
|
||||
_drop_params = _shared_kwargs.pop("drop_params", None) or litellm.drop_params
|
||||
polyfill_applied_edits: List[AppliedEdit] = []
|
||||
if context_management_spec and not litellm.drop_params:
|
||||
if context_management_spec and not _drop_params:
|
||||
from litellm.llms.anthropic.experimental_pass_through.context_management import (
|
||||
apply_context_management,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue