Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[bug] text chat --api responses --tool web_search: non-streaming requests systematically fail with headers timeout; --stream works

Đang mở
#239 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
57/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
backend-api-design, cli

Hướng nghiên cứu

Start by reading the bl text chat command and its --stream option handling, then trace how non-streaming Responses API requests with tools are sent and how headers timeouts are handled. Reproduce the reported non-TTY request with --api responses --tool and compare it with --stream. Done means the non-streaming tool request can return successfully, or the CLI handles the timeout as intended; add a regression test for the behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment

  • CLI: bl 2.1.0
  • Skill: 2.1.0
  • Node: v25.9.0
  • OS: macOS 26.5.2 (arm64)
  • Region: cn-beijing (domestic; config profile token-plan, base_url https://token-plan.cn-beijing.maas.aliyuncs.com)

Reproduce

# Non-TTY (agent) invocation — systematically times out:
bl text chat --api responses --tool '{"type":"web_search"}' --timeout 300 \
  --system "Reply in 简体中文。" \
  --message "<a search question>"

# Same request with forced streaming — succeeds:
bl text chat --api responses --stream --tool '{"type":"web_search"}' --timeout 550 \
  --system "Reply in 简体中文。" \
  --message "<the same search question>"

Expected

Both invocations return the model's answer with web search results.

Actual

Without --stream: request systematically fails with headers timeout — Error: Network request failed: UND_ERR_HEADERS_TIMEOUT: Headers Timeout Error (exit 6) or Error: Request timed out ... This operation was aborted (exit 5). ~13 of 14 attempts failed over a period of hours; the single success took several minutes.

With --stream: 3/3 attempts succeeded, responses returned normally.

Analysis

bl text chat --help says --stream Stream response tokens (default: on in TTY). In non-TTY (agent/pipe) context the default is non-streaming, so the CLI waits for the full Responses-API + web_search run (multi-round searches, server-side) before receiving response headers — which reliably exceeds the gateway's headers timeout. Streaming receives headers early and works. Suggestion: for --api responses with tools (or in non-TTY generally), default to streaming, or automatically retry with streaming on UND_ERR_HEADERS_TIMEOUT.

Already tried

  • bl update / skill version aligned (2.1.0 across CLI, npm, skills)
  • Network ruled out: direct curl --noproxy '*' to the endpoint returns 404 in ~0.1s; same with system proxy — no local connectivity issue
  • --timeout raised to 550s — non-streaming still fails; streaming succeeds with the same timeout
  • Multiple retries over several hours: non-stream failure rate ~13/14, stream success 3/3

Notes

  • Frequency: always (non-streaming); none so far (streaming)
  • Invoked via: agent (non-TTY automation)
  • No request ID available: headers timeout means no response headers/ID were ever received
Ngôn ngữ chính
TypeScript
Star
527
Fork
33
Merge trung bình
6 giờ 43 phút
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelstudioai/cli

Tất cả issue của modelstudioai/cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.