bug: unguarded json.loads on streamed tool-call arguments crashes the request on empty/truncated JSON
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Xác định helper dùng chung extract_json() và các đường dẫn phân tích đối số streaming cho Anthropic, OpenAI chat completions, OpenAI Responses, cùng với việc phát lại lịch sử Anthropic. Theo dõi cách các payload rỗng hoặc bị cắt ngắn hiện đến được json.loads(), sau đó xác minh rằng dữ liệu đầu vào streaming sai định dạng tạo ra lỗi mô tả rõ ràng dành riêng cho công cụ và lịch sử bị hỏng được chuyển thành {} mà không hủy request.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
bug: unguarded json.loads on streamed tool-call arguments crashes the request on empty/truncated JSON
Bug 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 raises JSONDecodeError, which
surfaces to the user as a raw error and aborts the in-flight step:
Error: Expecting value: line 1 column 1 (char 0)
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:
- Parses strictly,
- Falls back to the existing lenient
extract_json()helper, - On total failure, raises a descriptive error naming the tool and including a payload snippet (instead of a bare JSONDecodeError).
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 current
request.
Environment
- Latest main
- Ngôn ngữ chính
- Python
- Star
- 667
- Fork
- 96
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của open-webui/computer
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-webui/computer#314 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-webui/computer#293 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-webui/computer#286 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
open-webui/computer#276 · 1 bình luận · 2 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-webui/computer#271 ·
Tất cả issue của open-webui/computer
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sierra-research/tau2-bench#635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The add-ssm-model skill requires a Cython simulator; the contributing guide allows Python onesCó thể đã có người làm @fmuia đã nhận hôm nay. Đang mởdocumentation skill
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
lnccbrown/ssm-simulators#406 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
btclib-org/btclib-ecc#309 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jbacalso24/mimry#459 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] POST /revoke with a FastMCP access token is a silent no-op (ownership gate never matches)Đang mởauth bug high-priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày