Problem
The codex executor hardcodes "parallel_tool_calls": true in the request template sent to upstream APIs. This causes 400 errors on third-party OpenAI-compatible providers that strictly validate parameters and do not support this field without tools being specified.
Error from upstream:
Invalid value for 'parallel_tool_calls': 'parallel_tool_calls' is only allowed when 'tools' are specified.
Current Behavior
CPA injects parallel_tool_calls: true into every codex request regardless of whether the upstream supports it. This is hardcoded in the binary — there is no config option to disable it.
From CPA logs:
[debug] [codex_executor.go:866] request error, error status: 400, error message: Invalid value for 'parallel_tool_calls': 'parallel_tool_calls' is only allowed when 'tools' are specified.
Impact
Any third-party OpenAI-compatible API that strictly validates request parameters (e.g. evomap.ai, and likely others) cannot be used as a codex-api-key channel. The alias model mapping feature works correctly, but the injected parallel_tool_calls causes the upstream to reject the request.
Channels that are lenient about extra parameters (songsongai, zicc, etc.) work fine because they silently ignore the unsupported field.
Suggested Solutions
Any of the following would resolve this:
- Per-channel config option: Add a
parallel-tool-calls: false field to codex-api-key entries to disable injection for specific channels
- Capability-based: Respect the
supports_parallel_tool_calls model capability flag — if the upstream model doesn't declare support, don't inject it
- Global config option: A top-level
disable-parallel-tool-calls flag
- Strip on error: If upstream returns 400 for
parallel_tool_calls, retry without it
Environment
- CPA Version: 7.1.59
- Config:
codex-api-key with alias model mapping
- Upstream: OpenAI-compatible API (non-OpenAI provider)
Problem
The codex executor hardcodes
"parallel_tool_calls": truein the request template sent to upstream APIs. This causes 400 errors on third-party OpenAI-compatible providers that strictly validate parameters and do not support this field withouttoolsbeing specified.Error from upstream:
Current Behavior
CPA injects
parallel_tool_calls: trueinto every codex request regardless of whether the upstream supports it. This is hardcoded in the binary — there is no config option to disable it.From CPA logs:
Impact
Any third-party OpenAI-compatible API that strictly validates request parameters (e.g. evomap.ai, and likely others) cannot be used as a
codex-api-keychannel. Thealiasmodel mapping feature works correctly, but the injectedparallel_tool_callscauses the upstream to reject the request.Channels that are lenient about extra parameters (songsongai, zicc, etc.) work fine because they silently ignore the unsupported field.
Suggested Solutions
Any of the following would resolve this:
parallel-tool-calls: falsefield tocodex-api-keyentries to disable injection for specific channelssupports_parallel_tool_callsmodel capability flag — if the upstream model doesn't declare support, don't inject itdisable-parallel-tool-callsflagparallel_tool_calls, retry without itEnvironment
codex-api-keywithaliasmodel mapping