[PR #10896] fix(provider): retry responses API without include on 400 rejection #13598

Open
opened 2026-02-16 18:18:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10896

State: open
Merged: No


Fixes #7524

when using scaleway's gpt-oss-120b with the responses api, requests fail because scaleway doesn't support the include parameter that the ai sdk adds automatically.

this adds retry logic to the fetch wrapper - if a /responses request returns 400 with an error mentioning "include is not supported", it strips the include field and retries once.

changes:

  • added retry-on-400 logic in provider.ts fetch wrapper
  • logs when retry happens for debugging
  • added tests with mock server covering retry and no-retry cases
  • fixed missing plugin mocks in amazon-bedrock tests that were causing unrelated failures

tested with bun test test/provider/ (165 pass) and bun run typecheck (all packages pass)

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10896 **State:** open **Merged:** No --- Fixes #7524 when using scaleway's gpt-oss-120b with the responses api, requests fail because scaleway doesn't support the `include` parameter that the ai sdk adds automatically. this adds retry logic to the fetch wrapper - if a /responses request returns 400 with an error mentioning "include is not supported", it strips the include field and retries once. changes: - added retry-on-400 logic in provider.ts fetch wrapper - logs when retry happens for debugging - added tests with mock server covering retry and no-retry cases - fixed missing plugin mocks in amazon-bedrock tests that were causing unrelated failures tested with `bun test test/provider/` (165 pass) and `bun run typecheck` (all packages pass)
yindo added the pull-request label 2026-02-16 18:18:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13598