Skip to content

feat: spend paid provider budgets before falling back to copilot - #28

Merged
icco merged 3 commits into
mainfrom
feat/paid-provider-budgets
Oct 17, 2026
Merged

icco merged 3 commits into
mainfrom
feat/paid-provider-budgets

Conversation

@icco

@icco icco commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Why

Defaults build and compaction to Claude Opus 5.5 and adds opencode-runtime-fallback 0.3.0, so a capped or failing provider moves on to OpenAI, then Google, then Copilot. /quota gains a $50 rolling 30-day estimate row for each paid provider from config/quota-toast.jsonc, and opencode-quota goes from 5.0.2 to 5.0.3.

Check the smoke test's quota_status assertions and that the fallback plugin loads on 2.0.32.

Risks

The fallback plugin replaces the native subagent task tool. Budget rows are local estimates; the provider console spend limits are the real caps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@icco
icco requested a balanced review from Copilot October 17, 2026 13:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

🟡 Changes recommended

Invalid quota window IDs prevent budget loading, and the compaction model override prevents fallback switching.

2 open issues
What changed in this PR

Prioritizes paid providers before Copilot and adds local budget estimates to quota reporting.

Changes:

  • Defaults to Anthropic with OpenAI, Google, and Copilot fallbacks.
  • Adds $50 rolling 30-day estimates for paid providers.
  • Packages quota configuration and extends routing smoke checks.
File Description
tests/​routing.test.mjs Checks provider ordering and budgets.
scripts/​test-router-integration.mjs Checks plugin loading and quota output.
README.md Documents fallback behavior and budget limits.
opencode.jsonc Configures Anthropic defaults and fallback chain.
entrypoint.sh Copies quota configuration at startup.
Dockerfile Includes quota configuration in the image.
config/​quota-toast.jsonc Defines paid-provider budget estimates.
.dockerignore Includes configuration in the build context.

Review effort: Balanced

Comment thread config/quota-toast.jsonc Outdated
Comment thread opencode.jsonc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@icco
icco requested a balanced review from Copilot October 17, 2026 13:12
@icco icco self-assigned this Oct 17, 2026

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.

🔵 Needs a closer look

Runtime failover and replacement subagent behavior need human verification beyond the plugin activation checks.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@icco
icco merged commit 47ec9c3 into main Oct 17, 2026
11 checks passed
@icco
icco deleted the feat/paid-provider-budgets branch October 17, 2026 13:18
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