Problem
When using the openai-codex provider with a ChatGPT subscription OAuth token, Hermes hardcodes codex_responses as the API mode in run_agent.py (lines 551-553). There is no way to override this from config.yaml or environment variables.
The Codex Responses API (/v1/responses) is currently returning empty output arrays for gpt-5.4, causing:
WARNING root: Invalid API response (retry 1/3): response.output is empty | Provider: model=gpt-5.4
The standard Chat Completions API (/v1/chat/completions) works fine with the same model and subscription.
Expected behavior
model.api_mode in config.yaml or HERMES_API_MODE env var should be respected even when using the openai-codex provider, allowing users to fall back to chat_completions when the Responses endpoint is degraded.
Current behavior
The provider detection in run_agent.py overrides any user-configured api_mode:
# Line 551-553
self.api_mode = "codex_responses"
Setting model.api_mode: chat_completions in config.yaml has no effect.
Environment
- Hermes Agent v0.7.0 (latest as of 2026-04-06)
- Provider: openai-codex with ChatGPT Pro OAuth
- Model: gpt-5.4
- Platform: macOS (Apple Silicon)
Workaround
None currently. Other tools (e.g., OpenClaw) using Chat Completions with the same model and subscription work fine.
Problem
When using the
openai-codexprovider with a ChatGPT subscription OAuth token, Hermes hardcodescodex_responsesas the API mode inrun_agent.py(lines 551-553). There is no way to override this fromconfig.yamlor environment variables.The Codex Responses API (
/v1/responses) is currently returning emptyoutputarrays forgpt-5.4, causing:The standard Chat Completions API (
/v1/chat/completions) works fine with the same model and subscription.Expected behavior
model.api_modeinconfig.yamlorHERMES_API_MODEenv var should be respected even when using theopenai-codexprovider, allowing users to fall back tochat_completionswhen the Responses endpoint is degraded.Current behavior
The provider detection in
run_agent.pyoverrides any user-configuredapi_mode:Setting
model.api_mode: chat_completionsin config.yaml has no effect.Environment
Workaround
None currently. Other tools (e.g., OpenClaw) using Chat Completions with the same model and subscription work fine.