Merge PR #910: fix: add missing Responses API parameters for Codex provider
Adds tool_choice=auto, parallel_tool_calls=true, and prompt_cache_key to Codex Responses API requests, matching the official Codex CLI. Root cause fix for #747 (agent claiming no shell access).
This commit is contained in:
commit
a71736ea73
2 changed files with 7 additions and 0 deletions
|
|
@ -2340,7 +2340,10 @@ class AIAgent:
|
|||
"instructions": instructions,
|
||||
"input": self._chat_messages_to_responses_input(payload_messages),
|
||||
"tools": self._responses_tools(),
|
||||
"tool_choice": "auto",
|
||||
"parallel_tool_calls": True,
|
||||
"store": False,
|
||||
"prompt_cache_key": self.session_id,
|
||||
}
|
||||
|
||||
if reasoning_enabled:
|
||||
|
|
|
|||
|
|
@ -235,6 +235,10 @@ def test_build_api_kwargs_codex(monkeypatch):
|
|||
assert kwargs["tools"][0]["strict"] is False
|
||||
assert "function" not in kwargs["tools"][0]
|
||||
assert kwargs["store"] is False
|
||||
assert kwargs["tool_choice"] == "auto"
|
||||
assert kwargs["parallel_tool_calls"] is True
|
||||
assert isinstance(kwargs["prompt_cache_key"], str)
|
||||
assert len(kwargs["prompt_cache_key"]) > 0
|
||||
assert "timeout" not in kwargs
|
||||
assert "max_tokens" not in kwargs
|
||||
assert "extra_body" not in kwargs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue