docs: Add note about non-openai providers; add --provider cli flag to the help (#484)

This commit is contained in:
Daniel Nakov
2025-04-21 17:53:09 -04:00
committed by GitHub
parent 09f0ae3899
commit e7a3eec942
2 changed files with 20 additions and 0 deletions

View File

@@ -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:
```shell