Skip to content

fix(codex): authenticate custom providers on Codex 0.149+ - #474

Open
kelvkhiu wants to merge 1 commit into
SaladDay:mainfrom
kelvkhiu:main
Open

kelvkhiu wants to merge 1 commit into
SaladDay:mainfrom
kelvkhiu:main

Conversation

@kelvkhiu

Copy link
Copy Markdown

Codex 0.149+ no longer sends the API key from auth.json for custom providers. As a result, switching to a third-party provider could produce a 401 “Missing API key” response.

This change writes the key as experimental_bearer_token in the active [model_providers.*] table. It keeps auth.json for the official ChatGPT login: third-party switches preserve it when login preservation is enabled and remove it otherwise. It also aligns requires_openai_auth with that setting and supports inline TOML provider tables.

This addresses the behavior reported in farion1231/cc-switch#6744.

Verification

  • cargo fmt --check passed
  • 9 focused Codex tests passed on Windows
  • cargo build --release passed on Windows

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