GeezerVison is showing github.com — feat(core): add separate ChatGPT token-sharing OAuth method by rekram1-node · Pull Request #52147 · anomalyco/opencode
Conversation
Summary
- Preserve the existing Codex browser/headless methods and add
chatgpt-token-sharing as a separate OAuth method under the same OpenAI provider.
- Reuse the issued OAuth client ID, migrate identifiable token-sharing credentials in place, and cache account-specific model snapshots in plugin KV.
- Complete sign-in without waiting for
/v1/models; use catalog models until an asynchronous refresh completes, then check every 15 minutes. Preserve the model context windows as reported.
- Add the
jose dependency in packages/core/package.json and bun.lock, plus focused plugin and provider-error coverage.
Notes
- The app UI is split into feat(app): show ChatGPT token-sharing guidance #52160. SQLite file permissions and token-sharing error messages are already on
v2 via other PRs, so this branch is merged with current v2 and does not duplicate them.
- The fallback allowlist contains ten IDs, but only matching models in the OpenAI catalog are copied. The inspected local catalog had five matching base models and no
-fast entries.
- Live sign-in and inference have not been verified.
Verification
bun test test/plugin/provider-chatgpt.test.ts test/plugin/provider-openai.test.ts test/session-error.test.ts test/database.test.ts (from packages/core)
bun run check
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Register user-owned ChatGPT OAuth clients, verify ID tokens, and secure stored credentials.
Use account-visible Responses models with stateless HTTP streaming and refreshed model discovery.
Preserve provider diagnostics, tailor retry behavior, and show ChatGPT plan and usage guidance.
rekram1-node
changed the title
feat(core): integrate ChatGPT token sharing
feat(core): add separate ChatGPT token-sharing OAuth method
Sep 29, 2026
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Hona
Awaiting requested review from Hona
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.