Files
oh-my-pi/packages
Dimitar Ganevandcan1357 252ddcba70 fix(ai): gate Copilot transient retry in isProviderRetryableError on provider
`streamAnthropic` runs for every `anthropic-messages` provider, not just
GitHub Copilot. The previous carve-out in `isProviderRetryableError`
checked only `status === 400 && code === "model_not_supported"`, which
means a genuinely-unsupported model on a non-Copilot Anthropic-compatible
backend would have been retried 3x with 2s/4s/8s backoff before failing.

Add `provider?: string` parameter and gate the carve-out on
`provider === "github-copilot"`. Callsite in `streamAnthropic` now
passes `model.provider`. Existing in-request retry wrappers in
`openai-responses.ts` / `openai-completions.ts` were already provider-
gated via `callWithCopilotModelRetry`, so no change there.

Add a regression test asserting the predicate returns true only when
`"github-copilot"` is passed.

Addresses Codex review feedback on #722.
2026-04-18 22:32:51 +02:00
..
2026-04-17 18:50:13 +02:00
2026-04-17 18:50:13 +02:00
2026-04-17 18:50:13 +02:00
2026-04-17 18:50:13 +02:00
2026-04-17 18:50:13 +02:00