Gemini 4 Neon: buffered tool calls >60s hit /chat/completions idle timeout (unexpected EOF during chunk size line / Incomplete response)
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
- 45/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ệ
- github, python
- Lĩnh vực
- backend-api-design, cli
Hướng nghiên cứu
Start by locating the /chat/completions streaming transport and its idle timeout, then trace how buffered tool call events are consumed; the issue does not name source files or tests. Compare the stream behavior with incremental text and reasoning deltas, and check whether keepalives or incremental tool arguments can prevent the idle disconnect. Done means large tool calls complete without the reported EOF and the transport behavior is covered by a regression test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When using gemini-4-neon in Copilot CLI (which routes exclusively through /chat/completions), any turn that generates a large single tool call (roughly >25–30 KB, e.g., creating a medium-to-large file with create) fails deterministically with:
Incomplete responseshown in the UI after the model's brief intro text- Automatic retries (5 retries, ~5s total backoff wait), all failing the same way
- Final error:
Execution failed: Failed to get response from the AI model; retried 5 times (total retry wait time: 5.00 seconds) Last error: Failed native model HTTP request: error decoding response body: error reading a body from connection: unexpected EOF during chunk size line
Root cause confirmed via --log-level all controlled probes:
gemini-4-neonon/chat/completionsdoes not streamtool_call_deltaarguments incrementally—it buffers the entire tool call JSON on the server and delivers it in a singleassistant.tool_call_deltaevent once generation finishes, sending zero SSE chunks while generating the tool-call arguments.- The
/chat/completionsstreaming connection enforces an exact 60.0-second inter-chunk idle timeout. Once tool-call argument generation takes >60s after the last text/reasoning chunk, the server/proxy abruptly closes the HTTP chunked stream without the terminating chunk (unexpected EOF during chunk size line, telemetrymodel_stream_interruption). - Because each retry attempts the exact same single large tool call, all 6 attempts (1 initial + 5 retries) fail deterministically at
prefill/intro + 60.0s, even after compacting conversation history.
In addition, at large contexts (~430K–467K input tokens), gemini-4-neon occasionally hits the same 60.3s transport drop before response headers arrive (no request_id), as well as transient HTTP 503 responses on /chat/completions.
Affected version
GitHub Copilot CLI 1.0.116.
Steps to reproduce the behavior
Run a standalone prompt asking gemini-4-neon to stream a short intro sentence and then call create with a ~28–40 KB file payload:
copilot --model gemini-4-neon --reasoning-effort low --log-level all --log-dir .\logs --no-ask-user --allow-all -s -p "First write a single short sentence saying you are creating the file. Then call the create tool to create sample.md containing a markdown table with 220 numbered rows (rows 1 to 220), where each row has columns: Row, Topic, Description (about 12 words of realistic technical text per row). Do not use powershell; use the create tool directly."
(Using 300+ rows / ~40 KB reproduces a 100% 6-of-6 retry failure; 220 rows / ~28 KB sits right on the 60s cliff and fails on Attempt 1.)
Controlled comparison (same machine, same CLI build, --log-level all)
Probe on gemini-4-neon |
Total duration | Streamed deltas | Max silent gap | Outcome |
|---|---|---|---|---|
~28 KB create tool call (Attempt 1) |
69.23s | 0 tool_call_delta |
60.001s (after last message_delta) |
Failed (failure_kind: "transport", model_stream_interruption) |
~28 KB create tool call (Retry 1) |
61.92s | 1 tool_call_delta (all 28,239 B at once) |
57.15s | Barely passed (2.85s under 60s cutoff) |
48.7 KB plain text (no tool call, low) |
109.05s | 350 message_delta |
0.62s | Passed, 0 retries |
Heavy xhigh reasoning (no tool call) |
159.11s | 33 reasoning_delta + 93 message_delta |
9.68s | Passed, 0 retries |
This rules out a general 60s total-turn limit or xhigh reasoning itself: long text and long reasoning turns stream incremental chunks and succeed cleanly well past 100–159s, while any single tool call whose buffered generation exceeds 60.0s is killed mid-stream.
Expected behavior
Large tool calls (such as create/edit writing a 30–50 KB file) on gemini-4-neon should complete reliably without hitting a 60-second mid-stream EOF—either by streaming incremental tool_call argument chunks on /chat/completions, sending periodic SSE keepalive comments/heartbeats while buffering a tool call, or raising the upstream idle timeout.
Additional context
- Synthetic repro debug-log timeline (220-row
createprobe, 2026-11-26):- Attempt 1 (
request_id: DE1C:214584:4357216:4662549:6B08548E):15:47:27.032Z—POST /chat/completionssent15:47:36.261Z— lastassistant.message_deltadispatched15:48:36.262Z— 60.001s later:[WARNING] [rust:model_events::producer] Model provider request failed {"stage":"inference","api_endpoint":"/chat/completions","failure_kind":"transport","request_id":"DE1C:214584:4357216:4662549:6B08548E"}followed bymodel_stream_interruptionandassistant.turn_retry
- Retry 1 (
Request-ID: 0d7d8c80-47b2-47bf-bef3-6de98c0c678f):15:48:37.350Z— retry sent15:48:41.791Z— lastassistant.message_deltadispatched15:49:38.940Z— 57.149s later: singleassistant.tool_call_deltacarrying the entire 28,239-bytecreateargument payload
- Attempt 1 (
- Catalog endpoint difference:
gemini-4-neonadvertisessupported_endpoints: ["/chat/completions"], whereasclaude-opus-5.5uses/v1/messagesandgpt-6.2-solusesws:/responses. - Environment:
- OS: Windows 11 (build 26300)
- Architecture: x86_64
- CLI: GitHub Copilot CLI 1.0.116
- Shell: PowerShell
- Ngôn ngữ chính
- Python
- Star
- 11.5k
- Fork
- 2k
- Merge trung bình
- 6 giờ 34 phút
- Pull request đã merge (30 ngày)
- 3
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 github/copilot-cli
-
area:plugins
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#5567 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationĐang mởarea:tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#5476 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5340 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Triage Suggestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Suggestion]: NoParrotĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
collabnix/awesome-mcp-lists#515 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày