Skip to content

Add runtime environment variable overrides for provider configuration#1

Closed
daniel-salib wants to merge 1 commit intomainfrom
runtime-provider-overrides
Closed

Add runtime environment variable overrides for provider configuration#1
daniel-salib wants to merge 1 commit intomainfrom
runtime-provider-overrides

Conversation

@daniel-salib
Copy link
Copy Markdown
Owner

Allows overriding provider base_url and wire_api via environment variables:

  • CODEX_PROVIDER_<PROVIDER_ID>_BASE_URL
  • CODEX_PROVIDER_<PROVIDER_ID>_WIRE_API

Where <PROVIDER_ID> is the provider ID from config.toml, uppercased with hyphens replaced by underscores (e.g., 'vllm-local' -> 'VLLM_LOCAL').

This enables testing against different backend servers without modifying config files, useful for:

  • Testing different ports (http://localhost:8000 vs 8001)
  • Switching between environments (dev/staging/prod)
  • CI/CD pipelines with dynamic configuration

Example usage:
CODEX_PROVIDER_VLLM_LOCAL_BASE_URL="http://localhost:8001/v1" \ CODEX_PROVIDER_VLLM_LOCAL_WIRE_API="responses" \ codex exec "what is 2+2"

Implementation details in RUNTIME_PROVIDER_OVERRIDES.md

@daniel-salib daniel-salib force-pushed the runtime-provider-overrides branch 5 times, most recently from 8698b34 to 8ec7dcc Compare November 14, 2025 11:24
@daniel-salib daniel-salib force-pushed the runtime-provider-overrides branch from 8ec7dcc to 3c028a4 Compare November 19, 2025 04:04
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 3, 2025

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant