Skip to content

fix(openai): show active API-key accounts in quota sidebar - #311

Merged
slkiser merged 7 commits into
slkiser:mainfrom
vmvarela:fix/multi-account-active-credentials
Oct 6, 2026
Merged

slkiser merged 7 commits into
slkiser:mainfrom
vmvarela:fix/multi-account-active-credentials

Conversation

@vmvarela

@vmvarela vmvarela commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Honor the active OpenCode credential when choosing the active OpenAI account.
  • Show API-key credentials as accounts, with an explicit ChatGPT-quota-unavailable status instead of querying ChatGPT usage with an API key.
  • Avoid repeating the account header and left-align wrapped status text in both all-window and single-window layouts; omit reset placeholders for untimed value rows.
  • Reuse the existing layout width, without a special 24-column limit or unused sidebar width option; consolidate duplicate test setup.

Verification

  • pnpm verify (2,617 tests passed, 1 skipped; build and package contents verified).
  • Regression tests cover both renderers at 20, 24, and 36 columns, plus mixed OAuth/API-key accounts.
  • Confirmed the generated dist sidebar output with a synthetic status row in both styles; no shared service restart performed.

Closes #310

@vmvarela
vmvarela marked this pull request as ready for review October 3, 2026 10:42
Keep active OpenAI accounts first and preserve the remaining credential order in mixed-account output.

Keep full account headers on untimed status rows and do not reserve unused reset-column space.

Number unnamed API-key accounts using the existing account-name convention so their headers stay distinct.

Clarify that ChatGPT quota requires OAuth and stored API keys show quota unavailable without a ChatGPT request.
…mes unique

- When an OpenAI API key and a Codex OAuth login are both active, list the
  active account of the session's own integration first, so a narrow compact
  line keeps the quota the session actually uses.
- Numbered names for unnamed API-key accounts skip numbers that an explicit
  account name already uses, so two accounts never share one header.

Known limitation: with quotaProjection "runway", a narrow compact line can
still prefer a runway row over the active API-key status; fixing that needs
account priority in the compact renderer.
…on is unknown

Without onlyCurrentModel the session's provider is not known. Among active logins, an OAuth login with quota numbers now goes before an API-key status, as before API keys were listed, so a narrow compact line keeps the quota.
@slkiser
slkiser merged commit 4284ca8 into slkiser:main Oct 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI API-key account is not shown as active beside OAuth

2 participants