mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #252] bug: unguarded json.loads on streamed tool-call arguments crashes the request on empty/truncated JSON #165
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#165
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @1-kabir on GitHub (Sep 5, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/252
bug: unguarded
json.loadson streamed tool-call arguments crashes the request on empty/truncated JSONBug description
Providers occasionally stream empty or truncated tool-call argument JSON
(e.g. output cut off by token limits or an upstream hiccup). The unguarded
json.loads()on streamed arguments then raisesJSONDecodeError, whichsurfaces to the user as a raw error and aborts the in-flight step:
This is provider-agnostic — any of the streaming providers can emit an empty
or truncated arguments payload.
Expected behavior
A malformed/empty streamed arguments payload should degrade gracefully, not
kill the request.
Suggested approach
Add a shared parse helper that:
extract_json()helper,Apply it to all streaming providers (Anthropic, OpenAI chat completions,
OpenAI Responses) and to Anthropic history replay, where a stale corrupt
payload in history should degrade to
{}rather than breaking the currentrequest.
Environment
@owui-terminator[bot] commented on GitHub (Sep 5, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #196 bug: tool-call arguments are never captured —
input_json_deltafragments are ignoredThis is the closest related issue in the same Anthropic/streaming tool-call path. It also concerns handling streamed tool-call arguments correctly, though it focuses on lost
input_json_deltafragments rather than crashes from malformed JSON.by penradioGables
🟣 #96 bug: OpenAI-compatible streaming usage can end responses early
This issue is about streaming-provider edge cases in OpenAI-compatible flows causing requests to terminate early. It is not about tool-call JSON parsing specifically, but it is adjacent to the same class of streaming robustness bugs.
by sandrogauci
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.