[bug] text chat --api responses --tool web_search: non-streaming requests systematically fail with headers timeout; --stream works
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 57/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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_urlhttps://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 --timeoutraised 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
- 主要语言
- TypeScript
- 星标
- 540
- 派生
- 35
- 平均合并
- 6 小时 43 分钟
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelstudioai/cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
modelstudioai/cli#242 ·
维护者通常 1 天内回复
-
[bug] vision describe: default base URL is the Coding Plan endpoint → HTTP 404 for all VL/OCR models未关闭
难度 2/5 1-3 小时 新手友好度 78/100
modelstudioai/cli#241 ·
维护者通常 1 天内回复
-
[bug] bl update: darwin-arm64 binary ships invalid ad-hoc signature, killed by macOS (Killed: 9)未关闭
难度 2/5 1-3 小时 新手友好度 65/100
modelstudioai/cli#223 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
modelstudioai/cli#240 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
modelstudioai/cli#231 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
查看 modelstudioai/cli 的全部 Issue
相似的 Issue
-
area:deploy task
难度 2/5 1-3 小时 新手友好度 72/100
wilanis/wilanis-js#1017 ·
维护者通常 1 天内回复
-
documentation v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/servers#5133 ·
维护者通常 1 天内回复
-
budget bug feature frontend good-issue medium needs-review OSCI'26 payments
难度 2/5 1-3 小时 新手友好度 75/100
SatyamPandey-07/WorkSphere#5990 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
lugassawan/swe-workbench#799 ·
维护者通常 1 天内回复
-
bug good first issue javascript
难度 2/5 1-3 小时 新手友好度 82/100
yukikotani231/sqlsift#326 ·
维护者通常 1 天内回复