Repository navigation
Serve the ChatGPT subscription relay to the Codex app - #1342
Open
andy-xu-db wants to merge 2 commits into
Open
andy-xu-db wants to merge 2 commits into
andy-xu-db wants to merge 2 commits into
Conversation
andy-xu-db
marked this pull request as ready for review
October 28, 2026 20:24
andy-xu-db
force-pushed
the
stack/codex-relay-desktop
branch
from
October 29, 2026 20:13
761ce60 to
2f23451
Compare
For a relayed OpenAI provider, ug's per-user login service (the Codex desktop OTLP proxy service) also runs the Codex relay proxy on a stable loopback port, and ~/.codex/config.toml points the Codex app's Databricks provider at it with requires_openai_auth and the MPS header. Codex's own ChatGPT login supplies Authorization. Only ug's own block is removed on switch-back or revert; a user-defined provider is left alone with a warning. Co-authored-by: Isaac <no-reply@databricks.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andy-xu-db
force-pushed
the
stack/codex-relay-desktop
branch
from
October 29, 2026 22:12
2f23451 to
ce04d8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🥞 Stacked PR
Use this link to review incremental changes.
Summary
The Codex app now gets ChatGPT subscription relay too, configured by the same
ug configure/ug codex --provider <relayed mps>run as the CLI. The app has no per-session ug process and can't combine a token helper with its ChatGPT login, so ug's per-user login service (the existing Codex desktop OTLP proxy service: systemd user unit, LaunchAgent or scheduled task) also serves the Codex relay proxy on a stable loopback port.ug otel-proxygains--relay-port, which startsstart_relay_proxy(..., codex=True)in the same process. The unit carries the relay port, which is recorded once and recovered on later runs, like the OTLP port.~/.codex/config.toml(Codex app settings) getsmodel_provider = "Databricks"and a relayed provider block. The block points athttp://127.0.0.1:<relay port>/v1, setsrequires_openai_authwith no auth command, and persists theDatabricks-Model-Provider-Serviceheader, because the app can't pick a provider service at launch (same as the Claude Desktop profile).ug codexsessions still use their own-cprovider and per-session proxy, which outrank this file.ug revert, removes only ug's own block (identified by the recorded relay port), and removes the service unless tracing still needs it.codexalso uses the app's relay entry.Testing
tests/test_agent_codex.py(relay lifecycle with stable ports across reconfigures, tracing and relay sharing one unit, partial removal and revert, user provider preserved, dry-run, and launchd/schtasks argv) andtests/test_cli.py(otel-proxy --relay-port).just lintclean.This pull request and its description were written by Isaac.