diff --git a/run_agent.py b/run_agent.py index 457479f6e..8a3fcf614 100644 --- a/run_agent.py +++ b/run_agent.py @@ -3772,7 +3772,7 @@ class AIAgent: def _call_chat_completions(): """Stream a chat completions response.""" import httpx as _httpx - _base_timeout = float(os.getenv("HERMES_API_TIMEOUT", 900.0)) + _base_timeout = float(os.getenv("HERMES_API_TIMEOUT", 1800.0)) _stream_read_timeout = float(os.getenv("HERMES_STREAM_READ_TIMEOUT", 60.0)) stream_kwargs = { **api_kwargs, @@ -4497,7 +4497,7 @@ class AIAgent: "model": self.model, "messages": sanitized_messages, "tools": self.tools if self.tools else None, - "timeout": float(os.getenv("HERMES_API_TIMEOUT", 900.0)), + "timeout": float(os.getenv("HERMES_API_TIMEOUT", 1800.0)), } if self.max_tokens is not None: diff --git a/tests/test_run_agent.py b/tests/test_run_agent.py index 1d60d6db4..b6aaedf72 100644 --- a/tests/test_run_agent.py +++ b/tests/test_run_agent.py @@ -637,7 +637,7 @@ class TestBuildApiKwargs: kwargs = agent._build_api_kwargs(messages) assert kwargs["model"] == agent.model assert kwargs["messages"] is messages - assert kwargs["timeout"] == 900.0 + assert kwargs["timeout"] == 1800.0 def test_provider_preferences_injected(self, agent): agent.providers_allowed = ["Anthropic"]