Repository navigation
[Bug] pi-ai localized timeout text is classified as PI_AI_ERROR and skips retry #6595
xiangyuliu
started this conversation in
General
Replies: 1 comment
|
复核确认: 修复方向极小:正则扩一条 同族两条:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
dsh-llm-pi-airecognizes Englishtimeout/timed outtext, but a gatewaythat reports the localized Chinese message
upstream_error: 请求超时fallsthrough to
PI_AI_ERROR. Since the generic code is not retryable by default,a real transient timeout terminates the turn immediately.
Environment
@deepseek-ai/dsh@0.1.5-rc.1@deepseek-ai/dsh-llm-pi-ai@0.1.5-rc.1llm-pi-ai/openai-responsesMinimal synthetic reproduction
Pass this provider error text through the
stopReason === 'error'path:Current classification in
packages/llm/llm-pi-ai/src/stream.ts:Observed result:
PI_AI_ERRORand nollm/retryevent.Expected result:
TIMEOUT, allowing the existing provider retry policy todecide whether and how often to retry.
Suggested narrow change
Suggested regression cases:
The negative case is important: this should not turn arbitrary localized
upstream errors into retryable timeouts. No change to the default retry count is
requested; deployments can still choose a smaller
maxRetrieswhen one gatewaytimeout is already expensive.
Longer term, preserving a structured error/status/cause from pi-ai would be
preferable to expanding text heuristics, but the current adapter explicitly has
only flattened
error.messagetext available.All reactions