Skip to content

feat(auth): support login with ChatGPT#153

Open
lmwnshn wants to merge 3 commits into
exoharness:mainfrom
lmwnshn:codex/chatgpt-login
Open

feat(auth): support login with ChatGPT#153
lmwnshn wants to merge 3 commits into
exoharness:mainfrom
lmwnshn:codex/chatgpt-login

Conversation

@lmwnshn

@lmwnshn lmwnshn commented Jul 19, 2026

Copy link
Copy Markdown

Add the ability to login with ChatGPT subscription and speak Codex streaming dialect.

Builds on #152 for secrets handling.

==> Configure model provider
Choose how Exo should access a model:
1) ChatGPT subscription
2) OpenAI API key
3) OpenRouter API key
Provider [1-3, default 1]: 1
Using ChatGPT subscription.

==> Log in to ChatGPT
Open https://auth.openai.com/codex/device
Enter code: <device-code>
Waiting for authorization…
logged in openai-chatgpt (<secret-id>)

Tested manually with ./exo.sh running locally on macOS.

AI use: Mostly written with 5.6 Sol.

let router = build_router(&request, format, &config)?;
let universal_request = build_universal_request(&request, true)?;
let payload = serialize_request(format, &universal_request)?;
let payload = if is_openai_chatgpt_request(&request) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super fond of how this turned out...


import type { Message } from "../harness";

export const CHATGPT_CODEX_BASE_URL = "https://chatgpt.com/backend-api/codex";

@lmwnshn lmwnshn Jul 19, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only skimmed this file, I figured ChatGPT knows how to speak its own protocol better than me. Seems to work.

I did get it to remove some stuff about conversation IDs and turn IDs that I think is just internal Codex telemetry.

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.

1 participant