Skip to content

Commit f21b41d

Browse files
committed
docs: Add note about non-openai providers; add --provider cli flag to help
1 parent 12ec57b commit f21b41d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,25 @@ export OPENAI_API_KEY="your-api-key-here"
7878
>
7979
> The CLI will automatically load variables from `.env` (via `dotenv/config`).
8080
81+
> **Note:** Codex also allows you to use other providers that support the OpenAI Chat Completions API. You can set the provider in the config file or use the `--provider` flag.
82+
>
83+
> The possible options for `--provider` are:
84+
>
85+
> - openai (default)
86+
> - openrouter
87+
> - gemini
88+
> - ollama
89+
> - mistral
90+
> - deepseek
91+
> - xai
92+
> - groq
93+
>
94+
> If you use a provider other than OpenAI, you will need to set the API key for the provider in the config file or in the environment variable as:
95+
>
96+
> ```shell
97+
> export <provider>_API_KEY="your-api-key-here"
98+
> ```
99+
81100
Run interactively:
82101
83102
```shell

codex-cli/src/cli.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const cli = meow(
5454
Options
5555
-h, --help Show usage and exit
5656
-m, --model <model> Model to use for completions (default: o4-mini)
57+
-p, --provider <provider> Provider to use for completions (default: openai)
5758
-i, --image <path> Path(s) to image files to include as input
5859
-v, --view <rollout> Inspect a previously saved rollout instead of starting a session
5960
-q, --quiet Non-interactive mode that only prints the assistant's final output

0 commit comments

Comments
 (0)