Repository navigation
Conversation
Read the selected local OpenCode 2 ChatGPT login to report subscription allowance and reset times through the existing Limits views. Preserve account identity on failed probes so switching accounts cannot reuse the previous quota.
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This PR adds a new production ChatGPT allowance integration for local OpenCode v2, including local OAuth credential reads, an external authenticated request, and shared usage-state changes. Its new capability and authentication-sensitive data flow warrant human review. You can add or adjust custom eligibility rules. Learn more. |
|
Note Written by dry-run draft, no action taken. closure is warranted under the prior approval rule. The diff adds a new OpenCode ChatGPT subscription integration that reads OAuth credentials from its database and calls the account usage API, beyond the existing Go limits reader; no triaged issue or maintainer approval establishes that expanded support scope. Agree with a maintainer on ChatGPT support and credential-reading scope, then link explicit approval or triage establishing the intended behavior for reconsideration; retain the unsupported-limits use case and read-only probe evidence. |
|
So which design do you want? |
Problem
As a user signed into ChatGPT through OpenCode, Usage → Limits tells me that no provider reports subscription limits. I have to leave T3 and open chatgpt.com to see how much allowance I have left and when it resets, even though T3 already shows those limits for Codex accounts.
Fix
Extend the existing Limits workflow to local OpenCode 2 ChatGPT connections when no Go subscription is reported. Read the selected OAuth credential from OpenCode's database read-only and fetch the account's allowance windows and reset times. Identify windows by their duration, including OSS accounts whose primary window is weekly. Failed reads after an account switch cannot reuse the previous account's quota.
This supplies the existing shared limits contract used by web, desktop, mobile, and
/usage-limits. External OpenCode servers, credit balances, and banked-reset redemption are outside this change. Expired logins are refreshed by OpenCode, not T3; token-sharing logins without access to the account API remain unsupported.Scope and approval
Submitted as a focused fix for a provider-support gap in the existing Usage → Limits capability: users signed into ChatGPT through OpenCode cannot see the allowance and reset times already available to Codex users. This reuses the existing limits contract and views, with account-switch handling needed to avoid displaying another account's quota. It does not introduce a new user workflow. On that basis, this is submitted under the focused, obvious-bug exemption; no prior maintainer approval is claimed.
Verification
vp run check:changedpassed: formatting, lint, knip, typechecking 20 affected/dependent packages, and 21 tests across three files.Model: GPT-6 Astra. Harness: OpenCode in T3 Code.