Skip to content

Add Copilot PAT quota diagnostics and support#16

Merged
slkiser merged 1 commit intomainfrom
15-bug-not-reading-github-copilot-premium-request-usage-correctly
Mar 5, 2026
Merged

Add Copilot PAT quota diagnostics and support#16
slkiser merged 1 commit intomainfrom
15-bug-not-reading-github-copilot-premium-request-usage-correctly

Conversation

@slkiser
Copy link
Owner

@slkiser slkiser commented Mar 5, 2026

Read and validate Copilot PAT quota configs from OpenCode runtime config candidate directories and add diagnostic metadata. Introduces helpers to discover candidate config paths, validate quota config content, classify PAT token kinds, and read quota config with metadata (readQuotaConfigWithMeta). Adds logic to select Copilot OAuth entries from auth.json and exposes getCopilotQuotaAuthDiagnostics that reports PAT vs OAuth configuration, effective source, and override behavior. queryCopilotQuota now prefers a valid PAT billing path, handles premium quota values more robustly, and uses a shared computePercentRemainingFromUsed helper. quota-status report is extended to include Copilot auth/diagnostic lines. README and types updated with PAT scope guidance and runtime config location notes. Tests updated to mock runtime paths, fs, and auth reading and a new test file for Copilot diagnostics was added.

Read and validate Copilot PAT quota configs from OpenCode runtime config candidate directories and add diagnostic metadata. Introduces helpers to discover candidate config paths, validate quota config content, classify PAT token kinds, and read quota config with metadata (readQuotaConfigWithMeta). Adds logic to select Copilot OAuth entries from auth.json and exposes getCopilotQuotaAuthDiagnostics that reports PAT vs OAuth configuration, effective source, and override behavior. queryCopilotQuota now prefers a valid PAT billing path, handles premium quota values more robustly, and uses a shared computePercentRemainingFromUsed helper. quota-status report is extended to include Copilot auth/diagnostic lines. README and types updated with PAT scope guidance and runtime config location notes. Tests updated to mock runtime paths, fs, and auth reading and a new test file for Copilot diagnostics was added.
@slkiser slkiser linked an issue Mar 5, 2026 that may be closed by this pull request
2 tasks
@slkiser slkiser merged commit 8e7bf7b into main Mar 5, 2026
3 checks passed
@slkiser slkiser deleted the 15-bug-not-reading-github-copilot-premium-request-usage-correctly branch March 6, 2026 09: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.

[bug]: Not reading github copilot premium request usage correctly

1 participant