Merge pull request #4203 from pipecat-ai/mb/fix-json-decode-tool-calls

Handle incomplete function call arguments from interrupted LLM streams
This commit is contained in:
Mark Backman
2026-03-31 15:28:53 -04:00
committed by GitHub
4 changed files with 16 additions and 3 deletions

1
changelog/4203.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed a crash (`JSONDecodeError`) when a user interruption occurs while the LLM is streaming function call arguments. Previously, the incomplete JSON arguments were passed directly to `json.loads()`, causing an unhandled exception. Affected services: OpenAI, Google (OpenAI-compatible), and SambaNova.