[PR #7603] fix: add ChatGPT-Account-Id header for organization subscriptions #12452

Closed
opened 2026-02-16 18:17:21 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7603

State: closed
Merged: Yes


Summary

  • Extracts ChatGPT account/workspace ID from OAuth JWT claims (including nested auth claims).
  • Stores accountId in OAuth credentials and reuses it for Codex API requests.
  • Adds unit tests for JWT parsing and account ID extraction.

Details

  • Uses ChatGPT-Account-Id header required by organization plans.
  • Preserves accountId during token refresh.

Testing

  • bun test test/plugin/codex.test.ts

Issue

Fixes #7570

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7603 **State:** closed **Merged:** Yes --- ## Summary - Extracts ChatGPT account/workspace ID from OAuth JWT claims (including nested auth claims). - Stores accountId in OAuth credentials and reuses it for Codex API requests. - Adds unit tests for JWT parsing and account ID extraction. ## Details - Uses ChatGPT-Account-Id header required by organization plans. - Preserves accountId during token refresh. ## Testing - bun test test/plugin/codex.test.ts ## Issue Fixes #7570
yindo added the pull-request label 2026-02-16 18:17:21 -05:00
yindo closed this issue 2026-02-16 18:17:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12452