github / github/copilot-cli

Copilot stuck with non-api error

未关闭
#2,799 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:models area:networking
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

Hey,
In quite a long prompt, I have encountered a copilot failing with logs:
```
2026-04-17T12:40:08.550Z [DEBUG] Sending telemetry event: copilot-cli/cli.telemetry (kind: session_usage_info)
2026-04-17T12:40:08.550Z [DEBUG] PremiumRequestProcessor: Setting X-Initiator to 'agent'
2026-04-17T12:40:08.551Z [INFO] --- Start of group: Sending request to the AI model ---
2026-04-17T12:40:08.562Z [DEBUG] Flushed 11 events to session 6de64bcd-80aa-446b-9a21-7bc9eb147ff7
2026-04-17T12:40:18.698Z [DEBUG] streaming request (Request-ID 00000-e2db69e9-b328-463f-a36c-30408cadaf71)
2026-04-17T12:40:36.491Z [DEBUG] [telemetry-queue] Flushing 15 events (51915 B → 3271 B gzipped)
2026-04-17T12:40:36.627Z [DEBUG] [telemetry-queue] POST failed: TypeError: fetch failed
2026-04-17T12:50:38.811Z [DEBUG] StreamingErrorRetryProcessor: Non-API error detected (retry 1): missing finish_reason for choice 0
2026-04-17T12:50:38.811Z [DEBUG] Retrying after 0.906466888767806 seconds (non-API error)...
2026-04-17T12:50:39.718Z [INFO] --- End of group ---
2026-04-17T12:50:39.812Z [INFO] CompactionProcessor: Utilization 20.9% (35047/168000 tokens) below threshold 80%
2026-04-17T12:50:39.978Z [DEBUG] Sending telemetry event: copilot-cli/cli.telemetry (kind: session_usage_info)
2026-04-17T12:50:39.978Z [DEBUG] PremiumRequestProcessor: Setting X-Initiator to 'agent'
2026-04-17T12:50:39.979Z [INFO] --- Start of group: Sending request to the AI model ---
2026-04-17T12:50:51.481Z [DEBUG] streaming request (Request-ID 00000-951d620d-b360-40d5-9338-eee4d49e15ce)
2026-04-17T12:51:06.753Z [DEBUG] [telemetry-queue] Flushing 1 events (3655 B → 1561 B gzipped)
2026-04-17T12:51:06.893Z [DEBUG] [telemetry-queue] POST failed: TypeError: fetch failed
2026-04-17T12:59:36.306Z [DEBUG] StreamingErrorRetryProcessor: Non-API error detected (retry 2): missing finish_reason for choice 0
2026-04-17T12:59:36.306Z [DEBUG] Retrying after 0.892253303896236 seconds (non-API error)...
2026-04-17T12:59:37.198Z [INFO] --- End of group ---
2026-04-17T12:59:37.297Z [INFO] CompactionProcessor: Utilization 20.9% (35047/168000 tokens) below threshold 80%
2026-04-17T12:59:37.463Z [DEBUG] Sending telemetry event: copilot-cli/cli.telemetry (kind: session_usage_info)
2026-04-17T12:59:37.463Z [DEBUG] PremiumRequestProcessor: Setting X-Initiator to 'agent'
2026-04-17T12:59:37.464Z [INFO] --- Start of group: Sending request to the AI model ---
2026-04-17T12:59:49.049Z [DEBUG] streaming request (Request-ID 00000-ad9b0a50-7898-421d-b4d1-5c3f179b38b1)
2026-04-17T13:00:06.963Z [DEBUG] [telemetry-queue] Flushing 1 events (3655 B → 1561 B gzipped)
2026-04-17T13:00:07.208Z [DEBUG] [telemetry-queue] POST failed: TypeError: fetch failed
```

### Affected version

1.0.31

### Steps to reproduce the behavior

No idea

### Expected behavior

copilot not crashing

### Additional context

node:24-slim container

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。