Skip to content

fix(copilot): show over-limit AI credits - #301

Merged
slkiser merged 2 commits into
slkiser:mainfrom
vmvarela:fix/copilot-over-limit-percentage
Sep 30, 2026
Merged

slkiser merged 2 commits into
slkiser:mainfrom
vmvarela:fix/copilot-over-limit-percentage

Conversation

@vmvarela

@vmvarela vmvarela commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Show Copilot Business token-billing usage after the included credit limit is exceeded, instead of falling back to a plan-only row.
  • Use GitHub-reported credits_used as AI Credits when valid; retain a guarded derived Premium Interactions fallback when that field is missing or invalid.
  • Add parser/provider regressions and clarify the normal versus over-limit behavior in the provider docs.

Linked Issue

Fixes #300

OpenCode Validation

  • Current production released OpenCode version tested: v2.0.20
  • Why this version is relevant to the fix: the server loaded the local package build and queried the active Copilot OAuth connection.

Before-and-after evidence

Before (/quota_status):

Plan: business | quota details unavailable

After (live local build):

Credits: 3,739/3,000 percent_remaining=0 reset_at=2026-10-01T00:00:00.000Z

Before/after TUI screenshots: comment #5908364360.

Surface checks:

  • TUI sidebar: before-and-after screenshots attached in the linked comment.
  • /quota_status: live probe verified against the local package.
  • Web/command output: not separately tested in this follow-up.
  • Toast: not separately tested.
  • Compact line below the message input: not separately tested.

Quality Checklist

  • I ran pnpm verify
  • This change is focused and avoids unrelated behavior changes
  • I updated or added tests when behavior changed
  • I updated docs when user-facing workflow, command, or config behavior changed
  • For provider changes, I followed Provider Changes; this is a Copilot parser/rendering fix, not a new provider.

@vmvarela

vmvarela commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Before:
image

After:
image

@vmvarela
vmvarela marked this pull request as ready for review September 30, 2026 09:46
@slkiser
slkiser merged commit a6a4151 into slkiser:main Sep 30, 2026
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.

[bug]: Copilot Business over-limit usage falls back to plan-only

2 participants