Skip to content

Codex: remove OPENAI_API_KEY requirement for AWF openai-proxy provider#33440

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-codex-openai-proxy-issue
Closed

Codex: remove OPENAI_API_KEY requirement for AWF openai-proxy provider#33440
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-codex-openai-proxy-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

Codex runs in AWF sandbox mode were failing with Missing environment variable: OPENAI_API_KEY even when using the AWF OpenAI proxy path. The generated config set model_provider = "openai-proxy" but still required a direct env key that is intentionally excluded from the sandbox.

  • Config generation (Codex MCP)

    • Removed env_key = "OPENAI_API_KEY" from the firewall-injected [model_providers.openai-proxy] block in generated Codex TOML.
    • Kept proxy routing intact (base_url + model_provider), so Codex continues to use AWF’s proxy endpoint without requiring provider secrets in-container.
  • Tests and fixtures

    • Updated Codex MCP config unit expectations to no longer require env_key for openai-proxy.
    • Updated the Codex wasm golden fixture to reflect the new generated TOML.
model_provider = "openai-proxy"

[model_providers.openai-proxy]
name = "OpenAI AWF proxy"
base_url = "http://172.30.0.30:10000"
supports_websockets = false

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Codex OpenAI proxy failing due to missing OPENAI_API_KEY Codex: remove OPENAI_API_KEY requirement for AWF openai-proxy provider May 20, 2026
Copilot AI requested a review from pelikhan May 20, 2026 03:55
@pelikhan pelikhan closed this May 20, 2026
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.

Codex OpenAI proxy fails because OPENAI_API_KEY is excluded from AWF sandbox

2 participants