openclaw/extensions/openai
Peter Steinberger a17058d191
feat(usage): show the account email with plan windows in the chat context popover (#106200)
* feat(usage): surface plan windows and account email in the chat context popover

The context-window popover now shows which account a session runs on:
provider usage snapshots carry an accountEmail resolved from the auth
profile when stored, the ChatGPT access-token JWT claims (openai/codex),
or the Claude CLI config file (~/.claude.json oauthAccount) for
keychain-synced logins. models.authStatus embeds it, quota groups keep
distinct accounts separate, and the popover renders the email under the
plan header for local CLI sessions and OpenClaw-configured subscriptions
alike.

* test(openai): assemble the fake usage JWT from parts

* test(usage): keep fixture tokens and identity plumbing scanner-safe

* fix(usage): verify the Claude CLI login before labeling usage with its email

Review findings: the CLI-config email fallback now requires the usage token
to match the cached CLI credential (and honors CLAUDE_CONFIG_DIR), so an
ambient login for another account never labels a snapshot; token-type
credentials propagate their stored email alongside oauth ones.

* style(anthropic): scanner-safe local for the CLI login read

* fix(usage): capture the Claude CLI account email on the credential

Review findings: reading ambient CLI config at usage-fetch time could not
verify keychain-only logins and could go stale across account switches.
The credential reader now captures oauthAccount.emailAddress next to the
credential it belongs to, the synced claude-cli profile carries it, and
the anthropic fetcher uses only the credential-borne identity.

* style(usage): scanner-safe credential fixtures and helper naming

* fix(auth): backfill the CLI account email onto existing synced profiles

Profiles synced before identity capture stay usable and skip CLI reads,
so upgraded installs would never gain the email until token rotation.
While the stored token material matches the CLI login, merge the
non-secret email onto the stored profile.

* style(test): scanner-safe email assertion

* test(auth): pin the no-reread invariant to identity-complete profiles
2026-07-13 03:39:16 -07:00
..
test-support feat(openai): default new setups to GPT-5.6 (#103581) 2026-07-10 10:22:58 +01:00
api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
auth-choice-copy.ts refactor(core): remove unused helper exports 2026-06-18 10:54:40 +08:00
base-url.test.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
base-url.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
default-models.test.ts feat(openai): default new setups to GPT-5.6 (#103581) 2026-07-10 10:22:58 +01:00
default-models.ts feat(openai): default new setups to GPT-5.6 (#103581) 2026-07-10 10:22:58 +01:00
embedding-batch.test.ts fix(memory): harden embedding batch workflows (#103472) 2026-07-11 16:43:58 -07:00
embedding-batch.ts fix(memory): harden embedding batch workflows (#103472) 2026-07-11 16:43:58 -07:00
embedding-provider.test.ts fix(openai-embedding): preserve openai/ prefix for non-native base URLs (#92135) 2026-06-18 14:03:41 -04:00
embedding-provider.ts fix(openai-embedding): preserve openai/ prefix for non-native base URLs (#92135) 2026-06-18 14:03:41 -04:00
image-generation-provider.test.ts fix(openai): preserve image routing before catalog load (#105518) 2026-07-12 18:27:57 +02:00
image-generation-provider.ts fix(openai): preserve image routing before catalog load (#105518) 2026-07-12 18:27:57 +02:00
index.test.ts test: enable noUncheckedIndexedAccess for extension tests (#105343) 2026-07-12 12:48:22 +01:00
index.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
media-understanding-provider.test.ts chore: migrate active GPT-5.5 references to GPT-5.6 (#104452) 2026-07-11 06:30:57 -07:00
media-understanding-provider.ts chore: migrate active GPT-5.5 references to GPT-5.6 (#104452) 2026-07-11 06:30:57 -07:00
memory-embedding-adapter.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
memory-embedding-adapter.ts fix #88009: [Feature]: batched memory embedding should batch over files (#89138) 2026-06-09 06:38:30 -04:00
model-route-contract.test.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
model-route-contract.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
native-web-search.ts fix(search): enforce native web search tool policy (#91750) 2026-06-09 16:25:15 -07:00
openai-chatgpt-auth-identity.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-auth-identity.ts feat(tooling): enforce noUncheckedIndexedAccess in the extensions lane (NUIA phase 4) (#105132) 2026-07-12 09:17:31 +01:00
openai-chatgpt-catalog.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-device-code.test.ts feat(onboarding): add provider sign-in (#104502) 2026-07-11 13:00:17 -07:00
openai-chatgpt-device-code.ts feat(onboarding): add provider sign-in (#104502) 2026-07-11 13:00:17 -07:00
openai-chatgpt-oauth-abort.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-oauth-flow.runtime.test.ts fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit (#99479) 2026-07-07 00:18:20 +01:00
openai-chatgpt-oauth-flow.runtime.ts feat(onboarding): add provider sign-in (#104502) 2026-07-11 13:00:17 -07:00
openai-chatgpt-oauth-page.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-oauth-types.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-oauth.runtime.test.ts fix(openai): cancel OAuth preflight bodies 2026-06-19 09:53:35 +02:00
openai-chatgpt-oauth.runtime.ts feat(onboarding): add provider sign-in (#104502) 2026-07-11 13:00:17 -07:00
openai-chatgpt-pkce.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-provider.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-provider.test.ts test(openai): align prerelease contracts (#105256) 2026-07-12 10:49:48 +01:00
openai-chatgpt-provider.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
openai-chatgpt-shared.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-provider-missing-auth.test.ts feat(openai): default new setups to GPT-5.6 (#103581) 2026-07-10 10:22:58 +01:00
openai-provider.live.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-provider.test.ts fix(openai): preserve authored openai-completions through provider normalization (#105539) 2026-07-12 12:37:33 -07:00
openai-provider.ts fix(openai): preserve authored openai-completions through provider normalization (#105539) 2026-07-12 12:37:33 -07:00
openai-tts.live.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai.live.test.ts chore: migrate active GPT-5.5 references to GPT-5.6 (#104452) 2026-07-11 06:30:57 -07:00
openclaw.plugin.json feat(onboarding): add provider sign-in (#104502) 2026-07-11 13:00:17 -07:00
openclaw.plugin.test.ts chore: migrate active GPT-5.5 references to GPT-5.6 (#104452) 2026-07-11 06:30:57 -07:00
package.json chore(release): set version to 2026.7.2 2026-07-11 04:00:49 +01:00
prompt-overlay.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-auth.contract.test.ts test(openai): align auth contract with provider default (#103760) 2026-07-10 16:28:07 +01:00
provider-catalog.contract.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-contract-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-policy-api.test.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
provider-policy-api.ts fix(openai): align auth availability with effective routes (#104685) 2026-07-11 15:26:48 -07:00
provider-runtime.contract.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
realtime-provider-shared.test.ts fix(openai): add timeout to realtime client-secret requests (#102860) 2026-07-11 00:54:06 -07:00
realtime-provider-shared.ts fix(openai): add timeout to realtime client-secret requests (#102860) 2026-07-11 00:54:06 -07:00
realtime-quicksilver.test.ts feat(openai): recognize GPT-Live realtime models and fail closed with guidance (#104695) 2026-07-11 13:53:45 -07:00
realtime-quicksilver.ts feat(openai): recognize GPT-Live realtime models and fail closed with guidance (#104695) 2026-07-11 13:53:45 -07:00
realtime-transcription-provider.test.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-transcription-provider.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-voice-provider.test.ts fix(talk): await realtime tool result delivery (#103268) 2026-07-09 20:11:20 -07:00
realtime-voice-provider.ts feat(tooling): enforce noUncheckedIndexedAccess in the extensions lane (NUIA phase 4) (#105132) 2026-07-12 09:17:31 +01:00
register.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
replay-policy.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
setup-api.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
setup-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
shared.ts refactor: consolidate image data URL formatting (#99715) 2026-07-03 17:09:30 -07:00
speech-provider.test.ts fix(openai): route mp3 tts as voice messages (#100715) 2026-07-06 08:34:08 +01:00
speech-provider.ts fix(openai): route mp3 tts as voice messages (#100715) 2026-07-06 08:34:08 +01:00
test-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
thinking-policy.ts feat: support GPT-5.6 Ultra across OpenClaw and Codex runtimes (#98021) 2026-07-10 15:23:24 +01:00
transport-policy.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
transport-policy.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
tsconfig.json
tts.test.ts refactor(proxy): store captures in shared state database 2026-06-19 01:20:06 +08:00
tts.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
usage.test.ts feat(usage): show the account email with plan windows in the chat context popover (#106200) 2026-07-13 03:39:16 -07:00
usage.ts feat(usage): show the account email with plan windows in the chat context popover (#106200) 2026-07-13 03:39:16 -07:00
video-generation-provider.test.ts fix(openai): bound video create-submit response reads 2026-06-28 21:10:55 -07:00
video-generation-provider.ts refactor: consolidate image data URL formatting (#99715) 2026-07-03 17:09:30 -07:00