Qwen Batch API silently drops document sections with finish_reason=stop, tests show
yiliang114 · ghdev · 2026-09-27
A developer batching translation of nine Qwen Code Markdown docs via /batch-api (DashScope Batch, qwen3.7-plus, maxtokens 16384) found batch collect reported all 9 delivered, yet three files were missing sections.
Key comparisons:
- headless.md: 42 headings/30 code blocks in source → only 20/17 in Batch output, with 6 missing links; the identical request body via realtime Chat Completions preserved all 42/30.
- sdk-typescript.md: 28/17 source → 9/2 via Batch; realtime output complete.
Evidence locating the fault:
- The submitted JSONL contained the full source, and delivered files matched the raw provider response byte-for-byte — truncation happens in the provider's Batch generation path.
- Responses returned HTTP 200 with finishreason=stop (not length), using only 2,623 and 751 output tokens, far below the 16,384 limit.
- All nine per-item body hashes matched, ruling out request-side differences.
- Rerunning the same two docs in a fresh Batch job reproduced the exact same 20/42 and 9/28 truncation; a separate retry that returned stoptimeout was correctly marked failed.
Conclusion: the Batch path silently truncates document structure independent of token limits, while realtime is unaffected.
More from coding & agent
- Baseten's Guide: Evaluate Open Models for Coding Agents on Your Own PRs — baseten · 2026-11-16
- Google Research open-sources PaperOrchestra, a multi-agent framework for writing AI papers — google-research · 2026-11-16
- ffmpeg-skill gives coding agents local video editing via 42 FFmpeg tools and MCP — kajisho5 · 2026-11-16
- Agents Now Reply to Slack Messages on Their Own, Resolving a Prod Incident Ghost-to-Ghost — iamrobotbear · 2026-11-16
- Engineer's Interview Prep Method: Use Claude to Find Which Answers Undersell Your AI Work — brandon_galang · 2026-11-16
- DeepSeek open-sources its app frontend "chat-demo", already at 3.9k stars — NielsRogge · 2026-11-16