Skip to main content
← Back to list
01Issue
FeatureShippedExtensionsPublicTeam
Assigneeszack

Relationships

#3769 agent-runner: let the Codex provider use a custom model provider (base URL + auth command)

Opened by nckrtl · 10/22/2026· Shipped 10/22/2026

The Codex provider runs codex exec --ephemeral --ignore-user-config --ignore-rules, and requires CODEX_API_KEY. That keeps runs hermetic, which we want. But it leaves no way to send Codex through an OpenAI-compatible gateway (a self-hosted proxy or router), because the model provider normally lives in the ignored ~/.codex/config.toml.

Codex accepts the provider as -c overrides, and they work together with --ignore-user-config. We tested this with codex-cli 0.160.1: the hermetic flags alone get 401 from [HOST-1], and the same flags plus these overrides succeed through the gateway:

-c model_provider=<id>
-c model_providers.<id>.name="<name>"
-c model_providers.<id>.base_url="<https://gateway/v1>"
-c model_providers.<id>.wire_api="responses"
-c model_providers.<id>.auth.command="<token helper>"   # and auth.args

Request:

  1. A codex provider-config option, for example modelProvider: {id, name, baseUrl, wireApi, authCommand, authArgs}, or a generic configOverrides: string[], appended as -c arguments.
  2. When a model provider with its own auth is set, skip the CODEX_API_KEY requirement (resolveAuthKey), or allow auth: cli for Codex.

Related: the provider always passes --ask-for-approval. Current codex-cli exec (0.160.1) rejects that flag, while -c approval_policy=never works. Could you also say why --ignore-user-config was chosen? We assume hermetic CI runs, and we'd like to keep it.

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/agent-runner@2026.10.17.3
  • swamp: 20261022.021804.0-sha.983e2929
  • OS: linux (x86_64)
  • Deno: 2.9.8
  • Shell: /usr/bin/zsh
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 11 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/22/2026, 3:03:41 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack10/22/2026, 1:36:39 PM
Editable. Press Enter to edit.

system commented 10/22/2026, 10:41:53 AM

Classified automatically when this issue was filed.

  • Source: Extensions

If you feel this classification is incorrect, add a ripple to tell us so.

zack commented 10/22/2026, 3:03:44 PM

Thanks @nckrtl for reporting this! We shipped: Make the agent-runner Codex provider usable through an OpenAI-compatible gateway while keeping runs hermetic: fix the --ask-for-approval flag that codex exec rejects (send -c approval_policy instead), add a structured providerConfig.codex.modelProvider that emits Codex -c model_provider overrides (authCommand/authArgs under auth=cli, or the resolved API key via env_key under auth=apiKey), and allow auth=cli for Codex so no CODEX_API_KEY is required when the CLI authenticates itself. Docs explain the hermetic flags and the token-helper constraints.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.