@openai/codex 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,6 +22,7 @@
22
22
  - [Authenticate locally and copy your credentials to the "headless" machine](#authenticate-locally-and-copy-your-credentials-to-the-headless-machine)
23
23
  - [Connecting through VPS or remote](#connecting-through-vps-or-remote)
24
24
  - [Usage-based billing alternative: Use an OpenAI API key](#usage-based-billing-alternative-use-an-openai-api-key)
25
+ - [Forcing a specific auth method (advanced)](#forcing-a-specific-auth-method-advanced)
25
26
  - [Choosing Codex's level of autonomy](#choosing-codexs-level-of-autonomy)
26
27
  - [**1. Read/write**](#1-readwrite)
27
28
  - [**2. Read-only**](#2-read-only)
@@ -165,6 +166,35 @@ Notes:
165
166
  - This command only sets the key for your current terminal session, which we recommend. To set it for all future sessions, you can also add the `export` line to your shell's configuration file (e.g., `~/.zshrc`).
166
167
  - If you have signed in with ChatGPT, Codex will default to using your ChatGPT credits. If you wish to use your API key, use the `/logout` command to clear your ChatGPT authentication.
167
168
 
169
+ #### Forcing a specific auth method (advanced)
170
+
171
+ You can explicitly choose which authentication Codex should prefer when both are available.
172
+
173
+ - To always use your API key (even when ChatGPT auth exists), set:
174
+
175
+ ```toml
176
+ # ~/.codex/config.toml
177
+ preferred_auth_method = "apikey"
178
+ ```
179
+
180
+ Or override ad-hoc via CLI:
181
+
182
+ ```bash
183
+ codex --config preferred_auth_method="apikey"
184
+ ```
185
+
186
+ - To prefer ChatGPT auth (default), set:
187
+
188
+ ```toml
189
+ # ~/.codex/config.toml
190
+ preferred_auth_method = "chatgpt"
191
+ ```
192
+
193
+ Notes:
194
+
195
+ - When `preferred_auth_method = "apikey"` and an API key is available, the login screen is skipped.
196
+ - When `preferred_auth_method = "chatgpt"` (default), Codex prefers ChatGPT auth if present; if only an API key is present, it will use the API key. Certain account types may also require API-key mode.
197
+
168
198
  ### Choosing Codex's level of autonomy
169
199
 
170
200
  We always recommend running Codex in its default sandbox that gives you strong guardrails around what the agent can do. The default sandbox prevents it from editing files outside its workspace, or from accessing the network.
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openai/codex",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "codex": "bin/codex.js"