bug: Streams that are not SSE (Bedrock, Ollama NDJSON) reach the client only when they end
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Start in core/listener/forwardproxy/server.go around lines 972 and 1015, then read the existing fix for #1879. Reproduce with a Go test that sends five flushed event-stream lines at 400 ms intervals, with and without a body-reading plugin. Done means supported non-SSE streams reach the client incrementally and are not buffered until completion.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The proxy streams a response only when its type is text/event-stream. It buffers all other streaming responses until they are complete. These streams arrive at the client only at the end:
- Bedrock
invoke-with-response-stream(application/vnd.amazon.eventstream) - Ollama
/api/chat(application/x-ndjson) - Gemini
streamGenerateContentwithoutalt=sse
These streams also get a 502 when they are larger than 10 MB (see #1879).
Reproduction (main at 676557d35)
A Go test that builds forwardproxy.NewServer with one ReadsBody plugin. The upstream sends Content-Type: application/vnd.amazon.eventstream and writes one line every 400 ms, five times, with a flush after each line.
Result: the client gets the first line after 2.007 s, which is when the upstream ends the stream. Without the proxy, the first line arrives at about 0 s.
Cause
core/listener/forwardproxy/server.go:972: httpx.IsEventStream is the only test for a stream. All other responses go to the buffered branch at server.go:1015 when any plugin reads bodies. inference-parser always reads bodies.
Fix
Use the same fix as #1879: buffer only parsed traffic. Also send ContentLength == -1 responses through flushWriter when no plugin must read them.
Impact if not fixed
Claude Code on Bedrock through Cortex shows no streamed output. Local Ollama and Gemini clients that use these formats have the same problem.
- Ngôn ngữ chính
- Go
- Star
- 26
- Fork
- 46
- Merge trung bình
- 9 giờ 55 phút
- Pull request đã merge (30 ngày)
- 257
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọ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 rossoctl/cortex
-
bug laptop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug laptop
Độ 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
-
feat: Do not count a removed session's cost again when an import brings it backCó thể đã có người làm @huang195 đã nhận hôm nay. Đang mởenhancement
rossoctl/cortex#1885 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: The JWT bypass matches a cleaned path but forwards the raw path, so /mcp/../healthz skips validationCó thể đã có người làm @evaline-ju đã nhận hôm nay. Đang mởbug
rossoctl/cortex#1884 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: One-hour Anthropic cache writes are priced at the 5-minute rate, so spend is 37.5% too lowĐang mởbug
Độ khó 3/5 1-2 ngày 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
Tất cả issue của rossoctl/cortex
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Containerpak/cpak#93 ·
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
router-for-me/CLIProxyAPI#7607 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ui/ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
myNameArnav/lex#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100