Client or integration
Codex App
Provider or upstream service
Volcengine Ark (火山方舟) Agent Plan
OpenCodex version
2.7.33
Endpoint or capability
OpenAI Responses API at /api/plan/v3/responses
Current behaviour
When a key-auth provider uses the openai-responses adapter with this Agent Plan base URL:
https://ark.cn-beijing.volces.com/api/plan/v3
OpenCodex constructs the upstream URL as:
https://ark.cn-beijing.volces.com/api/plan/v3/v1/responses
The extra /v1 causes the upstream request to return 404 Not Found.
The current key-auth branch in src/adapters/openai-responses.ts always removes only a trailing /v1 and then appends /v1/responses:
const base = provider.baseUrl.replace(/\/v1\/?$/, "");
url = `${base}/v1/responses`;
As a temporary workaround, switching the provider to openai-chat succeeds through /api/plan/v3/chat/completions, but this translates the Codex Responses request to Chat Completions and does not use the provider's native Responses endpoint.
Expected behaviour
OpenCodex should support key-auth OpenAI-compatible providers whose configured base URL already contains a provider-specific version path. For Volcengine Ark Agent Plan, the request should be sent to:
https://ark.cn-beijing.volces.com/api/plan/v3/responses
Ideally this should be configurable (for example, an explicit Responses endpoint/path or a baseUrl mode that appends only /responses) rather than hard-coded specifically for Volcengine. Existing providers that expect /v1/responses should keep their current behaviour.
Minimal redacted request or reproduction
# Provider configuration (API key redacted)
{
"adapter": "openai-responses",
"baseUrl": "https://ark.cn-beijing.volces.com/api/plan/v3",
"authMode": "key",
"apiKey": "<REDACTED>",
"defaultModel": "glm-5-2"
}
# Request sent to OpenCodex
curl -X POST http://127.0.0.1:10100/v1/responses \
-H 'Content-Type: application/json' \
-d '{
"model": "<provider-name>/glm-5-2",
"input": "Reply exactly: OK",
"stream": false
}'
Actual response or error
unexpected status 404 Not Found: Unknown error,
url: http://127.0.0.1:10100/v1/responses
# Resolved upstream URL:
https://ark.cn-beijing.volces.com/api/plan/v3/v1/responses
Upstream documentation
The public Responses API example follows the same convention: a versioned base URL (for example, https://ark.cn-beijing.volces.com/api/v3) with the client appending /responses. The Agent Plan base is https://ark.cn-beijing.volces.com/api/plan/v3, so its concrete Responses endpoint is /api/plan/v3/responses.
Suggested mapping or implementation notes
Possible backward-compatible approaches:
- Add an optional provider field such as
responsesPath or responsesUrl.
- Add a setting indicating that
baseUrl is already the complete versioned API base, so the adapter appends only /responses.
- As a narrower compatibility rule, recognize Volcengine Ark
/api/plan/v3 and /api/coding/v3 bases and append /responses.
An explicit configurable endpoint/path seems the most general solution because other OpenAI-compatible providers may also use non-/v1 version paths.
Additional context and attachments
- The same provider and model work through OpenCodex's
openai-chat adapter at /api/plan/v3/chat/completions (HTTP 200), confirming that authentication, model name, and the base service are valid.
- This report is specifically about native Responses URL construction, not model discovery.
- No API keys or credentials are included.
Checks
Client or integration
Codex App
Provider or upstream service
Volcengine Ark (火山方舟) Agent Plan
OpenCodex version
2.7.33
Endpoint or capability
OpenAI Responses API at
/api/plan/v3/responsesCurrent behaviour
When a key-auth provider uses the
openai-responsesadapter with this Agent Plan base URL:OpenCodex constructs the upstream URL as:
The extra
/v1causes the upstream request to return404 Not Found.The current key-auth branch in
src/adapters/openai-responses.tsalways removes only a trailing/v1and then appends/v1/responses:As a temporary workaround, switching the provider to
openai-chatsucceeds through/api/plan/v3/chat/completions, but this translates the Codex Responses request to Chat Completions and does not use the provider's native Responses endpoint.Expected behaviour
OpenCodex should support key-auth OpenAI-compatible providers whose configured base URL already contains a provider-specific version path. For Volcengine Ark Agent Plan, the request should be sent to:
Ideally this should be configurable (for example, an explicit Responses endpoint/path or a
baseUrlmode that appends only/responses) rather than hard-coded specifically for Volcengine. Existing providers that expect/v1/responsesshould keep their current behaviour.Minimal redacted request or reproduction
Actual response or error
unexpected status 404 Not Found: Unknown error, url: http://127.0.0.1:10100/v1/responses # Resolved upstream URL: https://ark.cn-beijing.volces.com/api/plan/v3/v1/responsesUpstream documentation
The public Responses API example follows the same convention: a versioned base URL (for example,
https://ark.cn-beijing.volces.com/api/v3) with the client appending/responses. The Agent Plan base ishttps://ark.cn-beijing.volces.com/api/plan/v3, so its concrete Responses endpoint is/api/plan/v3/responses.Suggested mapping or implementation notes
Possible backward-compatible approaches:
responsesPathorresponsesUrl.baseUrlis already the complete versioned API base, so the adapter appends only/responses./api/plan/v3and/api/coding/v3bases and append/responses.An explicit configurable endpoint/path seems the most general solution because other OpenAI-compatible providers may also use non-
/v1version paths.Additional context and attachments
openai-chatadapter at/api/plan/v3/chat/completions(HTTP 200), confirming that authentication, model name, and the base service are valid.Checks