[bug] text chat --api responses --tool web_search: non-streaming requests systematically fail with headers timeout; --stream works
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 57/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- node.js, typescript
- Domínio
- backend-api-design, cli
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 527
- Forks
- 33
- Merge médio
- 6h 43min
- PRs com merge (30d)
- 23
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de modelstudioai/cli
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
modelstudioai/cli#242 ·
Mantenedores costumam responder em até 1 dia
-
[bug] vision describe: default base URL is the Coding Plan endpoint → HTTP 404 for all VL/OCR modelsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
modelstudioai/cli#241 ·
Mantenedores costumam responder em até 1 dia
-
[bug] bl update: darwin-arm64 binary ships invalid ad-hoc signature, killed by macOS (Killed: 9)Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
modelstudioai/cli#223 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
modelstudioai/cli#240 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
modelstudioai/cli#231 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
Todas as issues de modelstudioai/cli
Issues semelhantes
-
area:tui enhancement platform:macos
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
anthropics/claude-code#101490 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
netlify/netlify-mcp#75 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
atlassian-labs/compiled#1960 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
pnp/cli-microsoft365#7639 ·
Mantenedores costumam responder em até 2 dias
-
nextjs-tracking
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
cloudflare/vinext#3887 ·
Mantenedores costumam responder em até 1 dia