Lightweight coding agent that runs in your terminal
Rust
docs: Add note about non-openai providers; add --provider cli flag to the help (#484)
Daniel Nakove7a3eec94203
diff --git a/README.md b/README.mdindex e5690d7d48..1abae778cf 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 <provider>_API_KEY="your-api-key-here"+> ```+Run interactively:```shelldiff --git a/codex-cli/src/cli.tsx b/codex-cli/src/cli.tsxindex d716a07b01..65147b9e5b 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> Model to use for completions (default: o4-mini)+ -p, --provider <provider> Provider to use for completions (default: openai)-i, --image <path> Path(s) to image files to include as input-v, --view <rollout> Inspect a previously saved rollout instead of starting a session-q, --quiet Non-interactive mode that only prints the assistant's final output