mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(llm_response_utils): actually widen the except clause
The earlier commit added the rationale comment but the clause still read json.JSONDecodeError alone, so the four malformed payloads kept escaping.
This commit is contained in:
parent
523c30dcf3
commit
752e755da5
1 changed files with 1 additions and 1 deletions
|
|
@ -413,7 +413,7 @@ def _handle_invalid_parallel_tool_calls(
|
|||
shift += len(replacement) - 1
|
||||
|
||||
return tool_calls
|
||||
except json.JSONDecodeError:
|
||||
except (json.JSONDecodeError, KeyError, TypeError, AttributeError):
|
||||
# if there is a JSONDecodeError, return the original tool_calls
|
||||
return tool_calls
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue