diff --git a/README.md b/README.md index e5690d7d..1abae778 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,25 @@ export OPENAI_API_KEY="your-api-key-here" > > The CLI will automatically load variables from `.env` (via `dotenv/config`). +> **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. +> +> The possible options for `--provider` are: +> +> - openai (default) +> - openrouter +> - gemini +> - ollama +> - mistral +> - deepseek +> - xai +> - groq +> +> 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: +> +> ```shell +> export _API_KEY="your-api-key-here" +> ``` + Run interactively: ```shell diff --git a/codex-cli/src/cli.tsx b/codex-cli/src/cli.tsx index d716a07b..65147b9e 100644 --- a/codex-cli/src/cli.tsx +++ b/codex-cli/src/cli.tsx @@ -54,6 +54,7 @@ const cli = meow( Options -h, --help Show usage and exit -m, --model Model to use for completions (default: o4-mini) + -p, --provider Provider to use for completions (default: openai) -i, --image Path(s) to image files to include as input -v, --view Inspect a previously saved rollout instead of starting a session -q, --quiet Non-interactive mode that only prints the assistant's final output