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:
sclfcz 2026-09-26 09:08:03 +08:00
parent 523c30dcf3
commit 752e755da5

View file

@ -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