Problem
Today the plugin only forwards --model and --effort to Codex, and the app-server is always spawned as a bare codex app-server (see plugins/codex/scripts/lib/app-server.mjs). There is no way to pass Codex global overrides such as:
-c model_provider=<id> to select a custom provider
--profile <name>
- other
-c key=value config overrides
The only workaround is editing ~/.codex/config.toml / .codex/config.toml, which is awkward when you want a plugin-specific provider (e.g. routing the plugin through a LiteLLM/proxy provider) without changing your global Codex defaults.
Proposed solution
Add a CODEX_PLUGIN_CC_ARGS environment variable. When set, its value is tokenized (shell-style) and prepended to every codex invocation the plugin makes — the app-server runtime spawn and the availability checks. For example:
export CODEX_PLUGIN_CC_ARGS='-c model_provider=litellm'
results in the plugin running codex -c model_provider=litellm app-server.
This keeps the change opt-in, requires no per-command flags, and reuses Codex's own config-override surface.
Notes
- Read at runtime start; a session that already has a shared runtime needs a fresh session for new values to take effect.
- I have an implementation ready and will open a PR referencing this issue.
Problem
Today the plugin only forwards
--modeland--effortto Codex, and the app-server is always spawned as a barecodex app-server(seeplugins/codex/scripts/lib/app-server.mjs). There is no way to pass Codex global overrides such as:-c model_provider=<id>to select a custom provider--profile <name>-c key=valueconfig overridesThe only workaround is editing
~/.codex/config.toml/.codex/config.toml, which is awkward when you want a plugin-specific provider (e.g. routing the plugin through a LiteLLM/proxy provider) without changing your global Codex defaults.Proposed solution
Add a
CODEX_PLUGIN_CC_ARGSenvironment variable. When set, its value is tokenized (shell-style) and prepended to everycodexinvocation the plugin makes — the app-server runtime spawn and the availability checks. For example:results in the plugin running
codex -c model_provider=litellm app-server.This keeps the change opt-in, requires no per-command flags, and reuses Codex's own config-override surface.
Notes