mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
chore: simplify fallback kwargs copy comment
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
219a42f745
commit
b75b090a34
1 changed files with 2 additions and 6 deletions
|
|
@ -124,12 +124,8 @@ async def run_async_fallback(
|
|||
if mg == original_model_group:
|
||||
continue
|
||||
try:
|
||||
# Deep copy kwargs so each fallback attempt starts from the
|
||||
# original, unmodified parameters. Without this, provider-
|
||||
# specific handlers (e.g. Bedrock's converse_handler) can
|
||||
# mutate kwargs via .pop() calls, leaving subsequent fallback
|
||||
# providers with missing keys (e.g. `tool_choice` present but
|
||||
# `tools` removed). See https://github.com/BerriAI/litellm/issues/24764
|
||||
# Keep each fallback attempt isolated from mutations made while
|
||||
# preparing or sending a previous attempt.
|
||||
fallback_kwargs = safe_deep_copy(kwargs)
|
||||
|
||||
# LOGGING
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue