GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Show ChatGPT usage only when Codex sends requests to OpenAI by Sniezka1927 · Pull Request #14969 · nightly-labs/openbot

Conversation

@Sniezka1927

@Sniezka1927 Sniezka1927 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Linked issue

Closes #14960

Type of change

  • Bug fix
  • Small improvement or alignment, with no change to how a feature works
  • New provider, MCP app, or connector
  • Translation or documentation
  • New feature or change to existing behavior (needs an approved issue)

What changed

When Codex sends its requests to a third-party endpoint and the user is also signed in to ChatGPT, OpenBot showed the ChatGPT plan usage and credits for all Codex models. The composer then showed "Using credits" or "Usage limit reached" for requests that the ChatGPT plan did not pay for. This happens when the custom model_provider has requires_openai_auth = true, or when openai_base_url goes to a proxy: Codex then returns the ChatGPT account and its plan usage.

Now OpenBot reads the Codex config (config/read) before each Codex usage read. It reads the ChatGPT usage only when the active route goes to OpenAI: the default address, or api.openai.com / chatgpt.com over https. For other routes it shows no ChatGPT usage, drops the usage that Codex sends during a turn, and forgets old ChatGPT reset credits. When the config read fails, OpenBot keeps the old behavior and reads the usage, so a normal ChatGPT setup does not lose its usage display. The approach follows t3code (pingdotgg/t3code#18622); Codex's own TUI has the same open problem (openai/codex#48816).

Surfaces: backend only (src/backend/agent/codex-model-source.ts, src/backend/agent/provider-runtime.ts). The host decides, so the desktop, a joined server, the web client and mobile get the same result with no protocol change. No IPC contract, renderer, migration or documentation change.

Not changed: a route with requires_openai_auth = false (already handled by #8305). A proxy that sends requests to ChatGPT with the user's own login (for example CLIProxyAPI with requires_openai_auth = true) also stops showing ChatGPT usage, as in t3code.

Verification

  • Narrow checks for what changed: biome check on the changed files, bun run typecheck:node; bun run test:changed found no test file for these files — CI owns the full suite
  • Surfaces touched are named under "What changed"
  • A feature for agents, chats, channels, routines or server settings also works on a joined server, or "What changed" says why it is local only
  • Relevant manual smoke test completed, or not applicable
  • No credentials, private data, generated output, or real user files are included

Route check on real Codex 0.167.0 config/read output: default route → reads usage; openai_base_url to a proxy → no usage; third-party model_provider with requires_openai_auth = true → no usage; custom provider on https://api.openai.com/v1 → reads usage; OpenBot's own OPENAI_BASE_URL override (openbot_environment) → no usage.

Smoke test in the dev app (bun run dev, new profile, private Xvfb). Codex ran with a temporary CODEX_HOME, a dummy ChatGPT login, and a local HTTPS stub for the ChatGPT backend that reports the 5-hour window 100% used with credits:

# Feature Result Evidence
1 Third-party route (model_provider with requires_openai_auth = true) hides ChatGPT usage pass Codex checking → available; the stub got wham/accounts/check and /v1/models, no wham/usage; the rail "Provider usage" list shows Gemini only, no ChatGPT row
2 Default route still shows ChatGPT usage (reverse) pass After a restart with no model_provider: the stub got 3 wham/usage reads; the rail shows ChatGPT usage: 5-hour 0% left, Weekly 60% left. Open usage

Not checked: macOS and Codex 0.171.0 (the reporter's versions), a real third-party endpoint with a real ChatGPT login, the composer notice on a Codex agent (it uses the same usage rows that item 1 shows as absent).

Risk and security impact

None. One extra local config/read request to the Codex app server before each Codex usage read. No change to permissions, IPC, persistence or network access.

Model and harness: Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sniezka1927 and others added 2 commits November 23, 2026 03:39
@Sniezka1927 @claude
Show ChatGPT usage only when Codex sends requests to OpenAI
7827b25
A Codex model provider with `requires_openai_auth = true`, or a changed
`openai_base_url`, can send requests to a third-party endpoint while the
user is also signed in to ChatGPT. Codex then returns the ChatGPT account
and its plan usage and credits. OpenBot used them for every Codex model,
so the composer showed "Using credits" and "Usage limit reached" for
requests that the ChatGPT plan did not pay for.

OpenBot now reads the Codex config before each Codex usage read. It
reads the ChatGPT usage only when the active route goes to api.openai.com
or chatgpt.com over https, or when the route uses the default OpenAI
address. The same check drops the usage that Codex sends during a turn.
When the config read fails, OpenBot keeps the earlier behavior and reads
the usage, so a normal ChatGPT setup does not lose its usage display.

The approach follows t3code (pingdotgg/t3code#18622).

Fixes #14960

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Sniezka1927 @claude
Stop offering ChatGPT reset credits for a Codex route that is not OpenAI
9f4e7f2
When the Codex route changes from OpenAI to another provider while
OpenBot runs, the reset credits that an earlier read found stayed in
the list. Settings could then offer to spend a ChatGPT reset credit that
does not help the active route. The usage read for such a route now
also forgets these credits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Sniezka1927
Sniezka1927 requested review from NorbertBodziony and nrb-dev as code owners November 23, 2026 03:52
@Sniezka1927 @claude
Keep the Codex route check private to its module
d32fd31
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

NorbiAI Code Review

Reviewed commit: d32fd31c661c

Completed: 2026-11-23 03:59:51 UTC

Verdict

I found no actionable findings in this PR.

Resolved Since Previous Review

None.

Findings

No actionable findings.

Withdrawn Findings

None.

Review details
  • Files changed: 3
  • Lines: +53 / -1
  • Diff size: 5253 bytes
  • Reviewer: claude-opus-5-5, reasoning effort high
  • Scope: full PR
  • Time: 0m 45s, tokens: 234997
  • Claude Code 2.1.323
  • Status: success
  • Workflow run

A finding is wrong? Comment the concrete reason it is wrong — the guard it misses,
the line that already handles it — and include /norbiai review in the same comment.
The reviewer rechecks the finding against your argument and withdraws it if the argument
holds against the code.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Sniezka1927
Sniezka1927 merged commit b86db2c into main Nov 23, 2026
42 of 44 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Sniezka1927
Sniezka1927 deleted the triage-14960 branch November 23, 2026 04:16
@Sniezka1927 Sniezka1927 mentioned this pull request Nov 25, 2026
[Bug]: Sidebar usage rings missing for Codex, OpenCode and Cursor after update (only Claude and Gemini show) #16230
Closed
@openbotgit openbotgit Bot mentioned this pull request Nov 25, 2026
[Feature]: Opt-in setting to show ChatGPT usage when Codex goes through a local pass-through proxy #16406
Open
This was referenced Nov 26, 2026
[Bug]: GPT provider indicator missing from sidebar #16804
Open
[Bug]: ChatGPT usage ring missing from rail when Codex reports only a weekly window #17519
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@NorbertBodziony NorbertBodziony Awaiting requested review from NorbertBodziony NorbertBodziony is a code owner
@nrb-dev nrb-dev Awaiting requested review from nrb-dev nrb-dev is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: ChatGPT credit warnings appear when Codex uses a third-party endpoint

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Sniezka1927
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.