Make OpenAI auth login use ChatGPT by default#80790
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. for the review finding: source inspection shows a non-matching Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the branch open for maintainer review, preserve the manifest/runtime alignment fixes, reject unknown explicit auth methods before OAuth fallback, and require redacted real CLI proof for the login/list flows. Do we have a high-confidence way to reproduce the issue? Yes for the review finding: source inspection shows a non-matching Is this the best way to solve the issue? No; defaulting bare login to OAuth may be a reasonable direction, but the patch should preserve strict handling for explicit Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 9be43d5a8d96. |
|
Addressed the latest review/CI issues in The OpenAI auth setup metadata is now aligned between the runtime setup provider, static plugin manifest, and provider contract surface. The The login path now also clears stale lockouts for delegated result providers, so The |
|
Follow-up in The proof section is now in the fielded format required by the Real behavior proof gate, and the previous provider-registry/core-fast failure has been addressed by the test isolation fixes on this branch. |
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped # Conflicts: # src/commands/models/auth-list.ts
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped # Conflicts: # src/commands/models/auth-list.ts
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
* fix(openai): default provider login to ChatGPT auth * fix(openai): align auth login metadata and fast tests * fix(openai): prefer setup auth providers for login * fix(openai): reject unknown explicit auth methods * fix(line): keep channel entry imports scoped
Until now, the most obvious command for OpenAI auth still pointed at the direct API-key path, while the ChatGPT/Codex account login leaked the old
openai-codexprovider name into the user-facing setup flow. That is backwards now that OpenAI models default to the Codex runtime.This makes
openclaw models auth login --provider openaistart the ChatGPT/Codex account login by default. If someone wants to add a paid API-key profile, they can still do that explicitly with--method api-key.The selection rule is provider-shaped rather than OpenAI-shaped: when a provider offers OAuth, bare
loginchooses OAuth; when a provider only has one auth method, that method still runs; when a provider exposes several non-OAuth methods, OpenClaw keeps asking which one to use. The oldopenai-codexprovider spelling remains available for scripts and existing config.I also made
openclaw models auth list --provider openaishow the friendly OpenAI view across both normalopenai:*API-key profiles and internalopenai-codex:*ChatGPT subscription profiles, so the new command does not immediately force users back into the old naming.Real behavior proof
Behavior addressed:
openclaw models auth login --provider openaishould start the ChatGPT/Codex OAuth login by default, while--method api-keyshould still start the OpenAI API-key setup and--method device-codeshould still start the code-based ChatGPT/Codex login. A misspelled explicit method should fail instead of silently falling back to OAuth.Real environment tested: Local macOS maintainer checkout of this PR branch through
c758dd03066f8d401a4dd96f72a2cc4ad337489a, using the realpnpm openclawCLI with isolated temporaryOPENCLAW_HOMEdirectories under/tmp. The OAuth command opened the real OpenAI auth page in the browser; the flows were cancelled before completing auth, so no credentials were written to the normal local OpenClaw home.Exact steps or command run after this patch:
Evidence after fix:
Default OpenAI login entered the ChatGPT/Codex OAuth flow, not the direct API-key prompt:
The explicit API-key path still went to the API-key prompt:
The explicit code-based login still went to the Codex device-code flow:
A misspelled explicit method now fails before opening OAuth:
Observed result after fix: Bare
--provider openairesolves through the setup provider and starts ChatGPT/Codex OAuth. The API-key and device-code methods remain available only when requested explicitly with--method api-keyor--method device-code. Unknown explicit methods now fail closed instead of falling through to OAuth.What was not tested: Completing the OAuth, device-code, or API-key credential write was intentionally skipped. The proof verifies command routing and prompt selection, because the behavior changed in this PR is which auth flow OpenClaw chooses before credentials are entered.