Skip to content

Still an api-injected key, Codex

Quick fix

Add and switch to the official provider in preset providers, then sign out of Codex and sign back in with the official account.

Error output
当我登录账号进行使用的时候,依旧是 api 注入的 key
English translation

When I sign in to use it, it is still using the api-injected key.

This report describes cc-switch continuing to inject a previous third-party provider's API configuration when Codex signs in to an official account, preventing use through the official account. The issue persisted even after deleting `~/.codex/auth.json` and unsetting several environment variables.

The maintainer's solution was to add and switch to the official provider in preset providers, then complete the sign-in flow once. Afterward, users can switch between official and third-party providers. Another user noted that they could sign out through “File” -- “Sign out”.

  1. Add an official provider in cc-switch preset providers, then switch to that official provider.

  2. Sign out in Codex, then reopen it and complete official account sign-in. You can also sign out through “File” -- “Sign out”.

  3. After completing the official sign-in flow once, switch between the official and third-party providers as needed.

ToolCodex
VersionUnknown
PlatformsUnknown
What should I do if the key is still injected after resetting and signing in again?
First add and switch to the official provider in preset providers, then sign out and complete the official account sign-in flow again.
How do I sign out of Codex?
Run `/logout` in Codex, or click “File” -- “Sign out”.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.