Skip to content

fix: fall through on credit exhaustion and missing models - #39

Merged
icco merged 2 commits into
mainfrom
fix/fallback-patterns
Oct 22, 2026
Merged

icco merged 2 commits into
mainfrom
fix/fallback-patterns

Conversation

@icco

@icco icco commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Why

Adds retryable_error_patterns for OpenAI credit_balance_exhausted / "no credits remaining" and provider model-not-found errors (Vertex 404, OpenAI model_not_found). Without them the fallback chain stopped at google/gemini-4-argon when Vertex 404'd and never reached github-copilot/gpt-6-astra.

Risks

The model ... not found regex could match a non-provider error that mentions a model, causing an unneeded fallback.

icco and others added 2 commits October 22, 2026 23:40
The plugin's built-in patterns miss OpenAI's credit_balance_exhausted and provider model-not-found errors, so a chain stopped at the first such model instead of advancing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@icco
icco marked this pull request as ready for review October 22, 2026 23:43
@icco icco self-assigned this Oct 22, 2026
@icco
icco requested a balanced review from Copilot October 22, 2026 23:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused configuration change covers the intended error forms with no identified blocking defects.

No open issues 🎉

What changed in this PR

Extends the configured fallback rules so credit exhaustion and missing-model errors can advance to the next provider.

Changes:

  • Adds patterns for credit_balance_exhausted and “no credits remaining.”
  • Adds patterns for model-not-found messages and model_not_found, preserving existing retry patterns and timing settings.
File Description
opencode.jsonc Adds four retryable error patterns to the fallback configuration.

Review effort: Balanced

@icco
icco merged commit 75875cc into main Oct 22, 2026
9 checks passed
@icco
icco deleted the fix/fallback-patterns branch October 22, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants