Skip api.openai.com/v1/models refresh when using custom responses-api-endpoint
Resolved 💬 2 comments Opened Feb 9, 2026 by Ferrus91 Closed Feb 10, 2026
Problem
When using codex-action@v1.4 with a custom responses-api-endpoint (e.g., an in-house OpenAI-compatible proxy), the Codex CLI still calls https://api.openai.com/v1/models on startup to refresh available models.
If the API key is issued for the custom endpoint and not for OpenAI directly, this call always fails with a 401 Unauthorized:
ERROR codex_core::models_manager::manager: failed to refresh available models:
unexpected status 401 Unauthorized: Missing bearer authentication in header,
url: https://api.openai.com/v1/models?client_version=0.98.0
The error is non-fatal (the CLI continues), but it's noisy and confusing in CI logs.
Expected behavior
When a custom responses-api-endpoint is configured, the CLI should either:
- Skip the
api.openai.com/v1/modelsrefresh entirely, or - Call the custom endpoint's
/v1/modelsinstead, or - Provide a flag to disable the model refresh (e.g.,
--skip-model-refresh)
Reproduction
- Configure
codex-action@v1with a customresponses-api-endpointand an API key that is valid only for that endpoint - Run the action
- Observe the 401 error in logs from the direct
api.openai.com/v1/modelscall
Environment
- Codex CLI v0.98.0
openai/codex-action@v1- Using
responses-api-endpointpointed at an in-house proxy
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗