fix(provider): retry OpenAI Responses API on 404 errors#10507
fix(provider): retry OpenAI Responses API on 404 errors#10507zerone0x wants to merge 1 commit intoanomalyco:devfrom
Conversation
OpenAI's Responses API can return 404 for transient errors (e.g., "Item with id 'msg_xxx' not found"). Add isRetryable callback to mark these errors as retryable, enabling automatic retry through the existing retry mechanism in SessionProcessor. Retryable status codes: 404, 408, 429, 500, 502, 503, 504 Fixes anomalyco#10505 Co-Authored-By: Claude <noreply@anthropic.com>
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
I tried this change and it does not fix the issue. |
|
Thanks for testing! A few diagnostic questions:
I traced the code flow and the
If you can share more details about the specific scenario, I can investigate further or add logging to pinpoint where the issue is. |
|
Fixed in #10590 |
Summary
isRetryablecallback toopenaiFailedResponseHandlerto mark transient errors as retryableSessionProcessorretry mechanismRetryable status codes: 404, 408, 429, 500, 502, 503, 504
Fixes #10505
Changes
packages/opencode/src/provider/sdk/openai-compatible/src/responses/openai-error.ts- AddedRETRYABLE_STATUS_CODESset andisRetryablecallbackTest plan
🤖 Generated with Claude Code