Conversation
Owner
|
Thanks @darfink. This looks great and I definitely want to merge it. I'm holding off on merging right now because we need to give users more time to upgrade to v8 before cutting a breaking release, and I'm still on CLIProxyAPI v7 myself. I'll keep this PR open and merge it once the v8 transition window makes sense. |
massiveits
marked this pull request as ready for review
October 2, 2026 09:26
massiveits
self-requested a review
October 2, 2026 09:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenCode Go quota refresh currently depends on a separate plugin page, and generated account names expose key digests. This change uses CLIProxyAPI v8's generic quota API and gives accounts readable names.
The plugin advertises
quota_providerand implementsquota.identifier,quota.describe, andquota.fetch. Fetch uses the credential selected by CLIProxyAPI, then normalizes rolling, weekly, and monthly readings into native quota buckets. Missing readings stay unknown, invalid values return errors, and upstream errors do not expose credentials. Quota reset remains unsupported.The separate quota page and its management routes are removed. API key entries accept an optional
name; unnamed accounts useOpenCode Goor numbered labels. Existing IDs, custom labels, filenames, and host metadata remain intact. A cold-start check prevents duplicate records when existing files have readable names.This requires CLIProxyAPI v8.0.0 or later. Imports and the SDK dependency move from v7 to v8, and the plugin version becomes 0.2.0.
Validation:
go test ./...passed, including selected-credential quota fetch, value validation, account labels, and cold-start duplicate coverage.go vet ./...passed.