Repository navigation
feat: complete OpenCode Go CPA quota and catalog integration - #13
williamxhero wants to merge 10 commits into
Conversation
Advertise the quota_provider capability and serve quota.identifier, quota.describe, and quota.fetch so CLIProxyAPI v7.2.159+ (including v8) reports OpenCode Go credentials as quota-capable and serves their rolling, weekly, and monthly windows through /v0/management/quota/fetch. The quota RPC method names and wire shapes are declared locally, so the SDK stays on v7.2.138 and the plugin keeps reporting schema version 3. Older hosts ignore the unknown capability and keep loading the plugin. The separate quota page stays for hosts and Management Center builds without generic plugin quota rendering. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cap quota upstream lookups at 30 seconds for both the native provider and the separate page, since the default request timeout is minutes long. Assert schema version 3 literally and check the fetch wire keys, so an SDK bump that breaks older hosts fails the tests. Add the native quota provider to the release notes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
OpenCode Go's rolling limit spans five hours. Reporting it as 5h lets Management Center label and order it like other five-hour windows. Document the v8 Management API quota route as well. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # README.md # RELEASE_NOTES.md # internal/plugin/plugin.go # internal/plugin/quota.go
|
Thanks for the contribution. We’re planning to merge PR #10 at the end of this week, and PR #13’s quota changes overlap with it. Please split the catalog/model-routing changes from the quota and legacy Management Center compatibility work.
Also, please remove the We’re updating the plugin to CLIProxyAPI v8, so we don’t need to preserve CLIProxyAPI v7 compatibility in this work. Please avoid adding compatibility code or documentation for v7. Please run
The PR reports |
Summary
This PR completes the OpenCode Go CPA plugin integration for current CLIProxyAPI hosts and the legacy Management Center compatibility surface.
Changes
{ "cards": [...] }shape expected by older Management Center buildsmuse-spark-1.3-contributor-freecatalog entry and route Space Bunny models correctlyValidation
C:\Program Files\Go\bin\go.exe test ./...C:\Program Files\Go\bin\go.exe vet ./...Both commands pass.