mirror of
https://github.com/openai/codex.git
synced 2026-05-01 11:52:10 +03:00
Add openai_base_url config override for built-in provider (#12031)
We regularly get bug reports from users who mistakenly have the `OPENAI_BASE_URL` environment variable set. This PR deprecates this environment variable in favor of a top-level config key `openai_base_url` that is used for the same purpose. By making it a config key, it will be more visible to users. It will also participate in all of the infrastructure we've added for layered and managed configs. Summary - introduce the `openai_base_url` top-level config key, update schema/tests, and route the built-in openai provider through it while - fall back to deprecated `OPENAI_BASE_URL` env var but warn user of deprecation when no `openai_base_url` config key is present - update CLI, SDK, and TUI code to prefer the new config path (with a deprecated env-var fallback) and document the SDK behavior change
This commit is contained in:
@@ -129,8 +129,8 @@ const codex = new Codex({
|
||||
});
|
||||
```
|
||||
|
||||
The SDK still injects its required variables (such as `OPENAI_BASE_URL` and `CODEX_API_KEY`) on top of the environment you
|
||||
provide.
|
||||
The SDK still injects its required variables (such as `CODEX_API_KEY`) on top of the environment you provide. If you set
|
||||
`baseUrl`, the SDK passes it as a `--config openai_base_url=...` override.
|
||||
|
||||
### Passing `--config` overrides
|
||||
|
||||
|
||||
Reference in New Issue
Block a user