mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
fix: update mock agent signature to accept task_id after PR #419
The _Codex401ThenSuccessAgent mock overrides run_conversation() but was missing the task_id parameter, causing a TypeError in the gateway test.
This commit is contained in:
parent
50ea8adf46
commit
11a7c6b112
1 changed files with 2 additions and 2 deletions
|
|
@ -80,7 +80,7 @@ class _Codex401ThenSuccessAgent(run_agent.AIAgent):
|
|||
type(self).refresh_attempts += 1
|
||||
return True
|
||||
|
||||
def run_conversation(self, user_message: str, conversation_history=None):
|
||||
def run_conversation(self, user_message: str, conversation_history=None, task_id=None):
|
||||
calls = {"api": 0}
|
||||
|
||||
def _fake_api_call(api_kwargs):
|
||||
|
|
@ -90,7 +90,7 @@ class _Codex401ThenSuccessAgent(run_agent.AIAgent):
|
|||
return _codex_message_response("Recovered via refresh")
|
||||
|
||||
self._interruptible_api_call = _fake_api_call
|
||||
return super().run_conversation(user_message, conversation_history=conversation_history)
|
||||
return super().run_conversation(user_message, conversation_history=conversation_history, task_id=task_id)
|
||||
|
||||
|
||||
def test_cron_run_job_codex_path_handles_internal_401_refresh(monkeypatch):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue