No actionable comments were generated in the recent review.
Walkthrough
-
The usage-limit lookup now supports stored Console key and OAuth credentials. It sends an associated organization ID with usage requests, fingerprints Console credentials by workspace ID, and retries another credential after HTTP 401 or 403 responses.
Changes: Console credential usage
Layer / File(s) Summary Resolve stored credentials
packages/provider-opencode/src/server/usageLimits.ts,packages/provider-opencode/src/server/status.test.tsThe credential reader accepts stored key and OAuth records, extracts tokens and optional workspace IDs, and fingerprints credentials by workspace ID when available. Tests cover Console credential selection and shared workspace fingerprints. Send usage requests
packages/provider-opencode/src/server/usageLimits.ts,packages/provider-opencode/src/server/status.test.ts,packages/provider-opencode/src/server/driver.test.tsThe lookup sends the organization header when a workspace ID exists and retries another credential only after HTTP 401 or 403. Tests check request headers and set explicit auth content in the test helper. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related issues
- pingdotgg/t3code#14983 — The issue describes stored Console OAuth credentials with an organization ID that the usage-limit lookup did not read. This change reads the OAuth access token and sends the organization ID.
Suggested reviewers:
juliusmarminge
Merge Risk: External image Moderate · up to 797c1
-
The usage view can count one account twice when the same key is available with and without workspace metadata. Resolve that grouping issue before merging; the other fingerprint concerns remain conditional.
Pre-merge checks: Passed 4
-
Check name Status Explanation Title check Passed The title "fix(opencode): read usage from Console OAuth logins" follows conventional commit format and names the main change: the usage reader now accepts Console OAuth credentials, not only Console A… 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. Description check Passed The description explains the problem and expected behavior, summarizes the change, identifies the linked issue, justifies the focused fix, and reports specific verification results and limits. It cove… Full details: Title check
-
Explanation
The title "fix(opencode): read usage from Console OAuth logins" follows conventional commit format and names the main change: the usage reader now accepts Console OAuth credentials, not only Console API keys. The raw summary and objectives confirm this change, including the workspace ID header and the fingerprint update. The title does not cover the fingerprint change or the fallback behavior, which is acceptable for a title.
Full details: Description check
-
Explanation
The description explains the problem and expected behavior, summarizes the change, identifies the linked issue, justifies the focused fix, and reports specific verification results and limits. It covers the required template information, although it uses different section headings.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 2b65ffb
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
eca0bad7-5a03-4c35-a961-9a5cae0c507d
External image Commits
-
Reviewing files that changed from the base of the PR and between 30f0f7233754947476702c4feafe0932a3124d0d and 797c10742adfd11c3f26dd732db76af9f29f362e.
External image Files selected for processing: 3
-
packages/provider-opencode/src/server/driver.test.tspackages/provider-opencode/src/server/status.test.tspackages/provider-opencode/src/server/usageLimits.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 2b65ffb
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
eca0bad7-5a03-4c35-a961-9a5cae0c507d
External image Commits
-
Reviewing files that changed from the base of the PR and between 30f0f7233754947476702c4feafe0932a3124d0d and 797c10742adfd11c3f26dd732db76af9f29f362e.
External image Files selected for processing: 3
-
packages/provider-opencode/src/server/driver.test.tspackages/provider-opencode/src/server/status.test.tspackages/provider-opencode/src/server/usageLimits.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-