feat: add OpenCode Go quota usage - #1545
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughOpenCode Go quota support now validates the canonical endpoint, fetches ChangesOpenCode Go quota reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant QuotaProbeDispatcher
participant OpenCodeGoQuotaFetcher
participant OpenCodeGoUsageEndpoint
QuotaProbeDispatcher->>OpenCodeGoQuotaFetcher: request quota for key-authenticated opencode-go
OpenCodeGoQuotaFetcher->>OpenCodeGoUsageEndpoint: GET /usage with bearer API key
OpenCodeGoUsageEndpoint-->>OpenCodeGoQuotaFetcher: usage windows or failure response
OpenCodeGoQuotaFetcher-->>QuotaProbeDispatcher: normalized quota report or probe status
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
7df755c to
22de3b3
Compare
|
@coderabbitai review |
|
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
|
Tip For best results, initiate chat on the files or code changes.
🧠 Learnings usedYou are interacting with an AI system. |
Summary
Add OpenCode Go quota reporting through the official authenticated
GET /zen/go/v1/usageendpoint.Verification
bun test tests/opencode-go-quota.test.tsbun run typecheckBoth pass.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Bug Fixes