Skip to content

Migrate quota lookup to v8 management for 0.2.1 - #25

Merged
hawkff merged 1 commit into
mainfrom
migrate-quota-management-v8
Oct 17, 2026
Merged

hawkff merged 1 commit into
mainfrom
migrate-quota-management-v8

Conversation

@hawkff

@hawkff hawkff commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Move live Claude quota lookup to the v8 credential and authenticated-request endpoints. Preserve management authentication, path prefixes, response parsing, and quota waiting behavior. Do not fall back to legacy management routes.

Prepare version 0.2.1 and update the installation and quota documentation.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable defects were found.

Summary

Moves live Claude quota lookup to the v8 management routes and prepares version 0.2.1.

  • Claude quota checks use CLIProxyAPI’s v8 management routes.

No actionable issues were found. Tests were inspected, not run.

Diagram

sequenceDiagram
  participant Extension
  participant Proxy as CLIProxyAPI
  participant Claude
  Extension->>Proxy: GET /v8/management/credentials
  Proxy-->>Extension: Account metadata
  Extension->>Proxy: "GET /v8/management/credentials/models?name=..."
  Proxy-->>Extension: Account models
  Extension->>Proxy: POST /v8/management/requests/api-call
  Proxy->>Claude: GET OAuth usage
  Claude-->>Proxy: Quota windows
  Proxy-->>Extension: Wrapped usage response
  Extension->>Extension: Keep existing ready-or-wait decision
Loading

Reviews (1) · Last reviewed commit: "Migrate Claude quota lookup to v8 manage..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a593cfba-e088-43c2-81ff-d2dbc1238389
📥 Commits

Reviewing files that changed from the base of the PR and between a7f239e and 6c8fb9a.

📒 Files selected for processing: 4
  • README.md
  • package.json
  • src/claude-quota.ts
  • test/provider.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Updates
    • Claude quota lookups now use the CLIProxyAPI v8 management API for account, model, and usage requests. Live lookups require the /v8/management API and no longer fall back to legacy /v0/management routes.
    • Installation instructions now reference CLIProxyAPI 8.0.32 and package version 0.2.1.
    • Updated account handling supports encoded account names when the service URL includes a path prefix.

The Claude quota integration now uses CLIProxyAPI v8 management endpoints. Tests cover the updated routes and URL encoding. The README and package metadata now specify version 0.2.1 and the v8 API requirement.

Changes: Claude quota management API

Layer / File(s) Summary
Use v8 routes for Claude quota
src/claude-quota.ts, test/provider.test.ts
The quota flow now gets accounts from credentials, gets model catalogs from credentials/models, and submits quota requests through requests/api-call. Tests cover route usage, URL encoding, base URL prefixes, and 404 responses.
Update version and API documentation
README.md, package.json
Installation instructions and package metadata specify version 0.2.1. The quota documentation requires /v8/management and rules out fallback to /v0/management.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 6c8fb

The quota integration uses the v8 management routes, and the checked request and model-list contracts match the implementation. No concrete merge-blocking issue remains; the change is ready for normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: migrating quota lookup to the v8 management API for version 0.2.1.
Description check Passed The description accurately covers the v8 endpoint migration, preserved behavior, no legacy fallback, version update, and documentation changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hawkff
hawkff merged commit 89ab4c8 into main Oct 17, 2026
6 checks passed
@hawkff
hawkff deleted the migrate-quota-management-v8 branch October 17, 2026 17:25
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.

1 participant