You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.**Multi-Source Account Discovery**: For providers like GitHub Copilot, discovers accounts from multiple sources (OpenCode auth, CLI Keychain, VS Code config, browser cookies) and deduplicates by login/email
363
+
1.**Token Discovery**: Reads authentication tokens from OpenCode's `auth.json` (with multi-path fallback), including plugin-managed OpenAI metadata
364
+
2.**Multi-Source Account Discovery**: For providers like ChatGPT and GitHub Copilot, discovers accounts from multiple sources (OpenCode auth, OpenCode plugin files, CLI/Keychain/config stores, browser cookies) and deduplicates them by stable account metadata
359
365
3.**Parallel Fetching**: Queries all provider APIs simultaneously using TaskGroup
360
366
4.**Smart Caching**: Falls back to cached data on network errors
361
367
5.**Graceful Degradation**: Shows available providers even if some fail
@@ -377,6 +383,13 @@ The app searches for `auth.json` in these locations (in order):
If `oc-chatgpt-multi-auth` is installed and OpenCode sets `provider.openai.options.baseURL` to a localhost proxy, OpenCode Bar still queries the direct ChatGPT usage endpoint by default. Only the explicit `opencode-bar.codex.usageURL` override changes the usage endpoint.
392
+
380
393
### GitHub Copilot not showing
381
394
GitHub Copilot accounts are discovered from multiple sources (in priority order):
382
395
1.**OpenCode auth** — `copilot` entry in OpenCode `auth.json`
OpenCode Bar uses the direct ChatGPT usage endpoint by default. If `oc-chatgpt-multi-auth` sets OpenCode's `provider.openai.options.baseURL` to a localhost proxy, that proxy is ignored for usage requests unless `opencode-bar.codex.usageURL` is explicitly configured.
For `oc-chatgpt-multi-auth` account files, prefer the canonical ChatGPT account ID from the access token claims when present. The plugin's `accountId` may be an organization ID (`org-*`) for the selected workspace, while the JWT claim `https://api.openai.com/auth.chatgpt_account_id` is the stable per-account identifier.
89
+
81
90
**Response:**
82
91
```json
83
92
{
@@ -398,7 +407,13 @@ Client Secret: Set GEMINI_CLIENT_SECRET environment variable
398
407
"access": "eyJ...",
399
408
"refresh": "rt_...",
400
409
"expires": 1770563557150,
401
-
"accountId": "uuid"
410
+
"accountId": "uuid",
411
+
"idToken": "eyJ...",
412
+
"multiAccount": true,
413
+
"accountIdOverride": "org-selected-account",
414
+
"organizationIdOverride": "org-selected-account",
415
+
"accountIdSource": "org",
416
+
"accountLabel": "Personal [id:abc123]"
402
417
},
403
418
"github-copilot": {
404
419
"type": "oauth",
@@ -413,6 +428,44 @@ Client Secret: Set GEMINI_CLIENT_SECRET environment variable
413
428
}
414
429
```
415
430
431
+
`oc-chatgpt-multi-auth` may leave `accountId` unset in `auth.json` and instead store the selected workspace in `accountIdOverride` / `organizationIdOverride`. OpenCode Bar derives the canonical ChatGPT account ID from the OpenAI JWT claims and keeps the override value as additional metadata when needed.
OpenCode Bar reads every entry in these files, canonicalizes account IDs from the JWT claims, and merges duplicates with the OpenCode auth, Codex native auth, and `codex-lb` sources.
0 commit comments