Repository navigation
Conversation
A project can route a model through a different account than the host catalog does. Use the project catalog for thread limits and fallback selection, and discard stale readings when the selected login changes.
When Console and Go report no limits, read the selected local OpenCode 2 login without refreshing or writing its credentials. Only apply its allowance to routes that use that ChatGPT workspace.
Contributor
|
Closing: razzeee already has 3 or more open PRs here, which is the limit for contributors who are not vouched. Once one of them is merged or closed, open this again. See the open PR limit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With a local OpenCode 2 instance signed in to ChatGPT and no Console or Go allowance, Usage Limits could not show when the subscription allowance would reset.
Change
Read the selected ChatGPT login from OpenCode’s database only when Console and Go have no limits to report. The probe does not refresh or write credentials. Remote instances never read host credentials.
Match each reading to the project model and workspace that spend the allowance. When two instances share a login, Thread Details uses the fresher reading but keeps the selected instance’s model catalog for matching.
Scope
Follows up on PR #22885. This fixes the existing Limits view before a request fails. PR #26264 handles a different path: the reset time on a failed request.
Verification
2026-11-25T11:24:44Z.main,vp run check:changed origin/mainpassed, including 823 tests and typechecking across 43 packages. In the same local environment, Usage → Limits on the base commit showed no subscription limits. On the PR head it showed OpenCode’s ChatGPT weekly allowance: 13% left, resetting in 1d 10h.GPT-6.2 Astra via OpenCode.