Skip to content

[Bug]: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice. #930

@ayb

Description

@ayb

Bug Description

New install. Setup ChatGPT Codex via OAuth login.

Any interaction fails after 6 tries with the error message:

Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.

Steps to Reproduce

  1. Fresh install
  2. Connect ChatGPT Codex via OAuth
  3. Run hermes and send a message
  4. gets error

Expected Behavior

Expecting a successful interaction and response via ChatGPT Codex

Actual Behavior

Welcome to Hermes Agent! Type your message or /help for commands.

● is this working?

────────────────────────────────────────

⚠️  API call failed (attempt 1/6): ValueError
   :stopwatch:  Time elapsed before failure: 0.00s
   :memo: Error: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.
   :bar_chart: Request context: 2 messages, ~2,929 tokens, 30 tools
⚠️  API call failed (attempt 2/6): ValueError
   :stopwatch:  Time elapsed before failure: 2.01s
   :memo: Error: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.
   :bar_chart: Request context: 2 messages, ~2,929 tokens, 30 tools
⚠️  API call failed (attempt 3/6): ValueError
   :stopwatch:  Time elapsed before failure: 6.01s
   :memo: Error: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.
   :bar_chart: Request context: 2 messages, ~2,929 tokens, 30 tools
⚠️  API call failed (attempt 4/6): ValueError
   :stopwatch:  Time elapsed before failure: 14.03s
   :memo: Error: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.
   :bar_chart: Request context: 2 messages, ~2,929 tokens, 30 tools
⚠️  API call failed (attempt 5/6): ValueError
   :stopwatch:  Time elapsed before failure: 30.05s
   :memo: Error: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.
   :bar_chart: Request context: 2 messages, ~2,929 tokens, 30 tools
⚠️  API call failed (attempt 6/6): ValueError
   :stopwatch:  Time elapsed before failure: 62.09s
   :memo: Error: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.
   :bar_chart: Request context: 2 messages, ~2,929 tokens, 30 tools
❌ Max retries (6) exceeded. Giving up.
Exception in thread Thread-3 (run_agent):
Traceback (most recent call last):
  File "/home/ayb/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/home/ayb/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ayb/.hermes/hermes-agent/cli.py", line 3480, in run_agent
    result = self.agent.run_conversation(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ayb/.hermes/hermes-agent/run_agent.py", line 3966, in run_conversation
    raise api_error
  File "/home/ayb/.hermes/hermes-agent/run_agent.py", line 3472, in run_conversation
    api_kwargs = self._preflight_codex_api_kwargs(api_kwargs, allow_stream=False)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ayb/.hermes/hermes-agent/run_agent.py", line 1819, in _preflight_codex_api_kwargs
    raise ValueError(
ValueError: Codex Responses request has unsupported field(s): parallel_tool_calls, prompt_cache_key, tool_choice.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Operating System

Ubuntu 24.04

Python Version

3.11.15

Hermes Version

1.0.0

Relevant Logs / Traceback

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions