[bug] text chat --api responses --tool web_search: non-streaming requests systematically fail with headers timeout; --stream works
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- backend-api-design, cli
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 540
- Fork
- 35
- Merge medio
- 6h 43m
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelstudioai/cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelstudioai/cli#242 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug] vision describe: default base URL is the Coding Plan endpoint → HTTP 404 for all VL/OCR modelsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelstudioai/cli#241 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug] bl update: darwin-arm64 binary ships invalid ad-hoc signature, killed by macOS (Killed: 9)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
modelstudioai/cli#223 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
modelstudioai/cli#240 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
modelstudioai/cli#231 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di modelstudioai/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
feat(icons): add [solidping]Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
homarr-labs/dashboard-icons#2939 ·
I maintainer di solito rispondono entro 1 giorno
-
Agent/category reasoning variants are still checked against the stale model cache in chat.paramsApertaopencode
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
code-yeongyu/oh-my-openagent#10003 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Actions on ToastsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
I maintainer di solito rispondono entro 1 giorno