Repository navigation
Replies: 1 comment
|
这条完全成立,而且我把"码从哪来"也找到了 —— 它就在上游字符串里。另外你结尾那句"等 pi-ai 把 code 独立暴露"不必等。 1. 分类链逐字确认
白名单在 if (/\b(?:network|connection|socket|fetch)\b|\bECONN[A-Z]+\b/i.test(message)
|| /\b(?:other side closed|HTTP2 request did not get a response|WebSocket closed unexpectedly)\b/i.test(message)) {
return 'TRANSPORT'
}
2. 不进重试的精确闸门
⇒ 与你观察到的"零 retry 事件"完全吻合:连 3. ⭐ 码从哪来 —— 它已经在字符串里我拉了 const msg = error ? `${error.code || "unknown"}: ${error.message || "no message"}` : …
throw new Error(msg)⇒ 生成的正是
所以修法不必等上游:
建议把你这句改掉 —— 它会让维护者以为要等上游,从而降低优先级。 4. 我建议把修法从"逐码枚举"改成"解析码前缀"你的窄补丁方向正确、也不扩大兜底,可以接受。但既然
关键是保持"白名单"结构:不要因为省事就把 分支顺序也要保持在其后( 5. 一个你没提、但能解释"为什么以前没发现"的事实
6. 版本你标 7. 一条边界你本机的 regression 测试数字(143 等)属于你的私有改动,我没有核实 —— 那不影响上面的源码结论,但建议在报告里标为"本机测试"。 8. 与 #9502 的关系你和 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
This is a focused follow-up to #8844. The exact
upstream_http2_stream_errorcase is still reproducible on the currentmastercommit,d743267388641bc76f17c45ce8b4c231aed1d32c(0.2.1-alpha.2).An OpenAI Responses failure with:
{ "type": "response.failed", "response": { "error": { "code": "upstream_http2_stream_error", "message": "Upstream HTTP/2 stream failed" } } }reaches DSH as:
but is classified as
PI_AI_ERROR. Because the normal retry policy does not includePI_AI_ERROR, the transient stream interruption ends the turn without an automatic retry.Real Desktop reproduction
Environment:
0.2.1-alpha.2-d743267openai-responsesroutegpt-6-astra, reasoning effortmaxObserved session facts:
failure.code = PI_AI_ERRORandmessage = Upstream HTTP/2 stream failed.llm/retryand zerollm/retry-startedevents.The interruption itself is an upstream or relay transport failure. The DSH defect is the classification and resulting retry bypass.
Current source behavior
packages/llm/llm-pi-ai/src/stream.tsrecognizes this older HTTP/2 wording:It does not recognize either the stable code or the current message:
The value therefore falls through to
PI_AI_ERROR. The default retry set remains:Minimal fix tested locally
The narrow compatibility fallback is:
if (/\b(?:network|connection|socket|fetch)\b|\bECONN[A-Z]+\b/i.test(message) || /\b(?:other side closed|HTTP2 request did not get a response|WebSocket closed unexpectedly)\b/i.test(message) + || /\bupstream_http2_stream_error\b|\bupstream HTTP\/2 stream failed\b/i.test(message) || /\bterminated\b|premature close/i.test(message)) { return 'TRANSPORT' }This keeps genuinely unknown failures on
PI_AI_ERROR; it does not make the catch-all retryable.Local regression coverage includes:
response.failedtest that asserts the original message is retained and the DSH code isTRANSPORT;assistant/attempt(TRANSPORT) -> llm/retry -> llm/retry-started -> assistant/message;doc-syncgates passing.Requested action
Please land the narrow
TRANSPORTmapping forupstream_http2_stream_error/Upstream HTTP/2 stream failedon top of currentmaster. Preserving the provider code structurally should remain the longer-term fix when pi-ai exposes it separately fromerrorMessage, but the narrow mapping restores the existing bounded retry behavior now.This follow-up is intentionally narrower than #8844: it records a current-release/current-master reproduction of the exact HTTP/2 variant and a tested minimal patch.
All reactions