agentscope-ai / agentscope-ai/AgentTeams

大模型超时无法回复 || Large model times out and cannot reply

Offen
#899 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:model-higress bug
Vorherrschende Sprache
Go
Sterne
5.6k
Forks
692
Ø Merge
5 T. 4 Std.
Gemergte PRs (30 T.)
23

Beschreibung

### Bug Description

在沟通界面向大模型提问,大模型长时间无法回复,最后报错超时

### Steps to Reproduce

在沟通界面向大模型提问,大模型长时间无法回复,最后报错超时

### AI Analysis

_No response_

### Relevant Logs

```shell
ERROR /opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py:342 | 2026-06-02 05:27:53 | {'code': 'MODEL_TIMEOUT', 'message': 'Model inference timed out: qwen, timeout limit: 60 seconds\n(Details: /tmp/copaw_query_error_0edg9ra8.json)'}: Traceback (most recent call last):
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/app/runner/runner.py", line 535, in query_handler
async for msg, last in stream_printing_messages(
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/pipeline/_functional.py", line 192, in stream_printing_messages
raise exception from None
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_base.py", line 455, in __call__
reply_msg = await self.reply(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/agents/react_agent.py", line 1026, in reply
return await super().reply(
^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/tracing/_trace.py", line 390, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_react_agent.py", line 437, in reply
msg_reasoning = await self._reasoning(tool_choice)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/agents/react_agent.py", line 693, in _reasoning
return await super()._reasoning(tool_choice=tool_choice)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/agents/tool_guard_mixin.py", line 646, in _reasoning
return await super()._reasoning( # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_react_agent.py", line 568, in _reasoning
res = await self.model(
^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/providers/retry_chat_model.py", line 312, in __call__
result = await self._inner(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/token_usage/model_wrapper.py", line 48, in __call__
result = await self._model(
^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/tracing/_trace.py", line 602, in async_wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/model/_openai_model.py", line 291, in __call__
response = await self.client.chat.completions.create(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 2739, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/openai/_base_client.py", line 1931, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/openai/_base_client.py", line 1666, in request
raise APITimeoutError(request=request) from err
openai.APITimeoutError: Request timed out.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py", line 324, in stream_query
async for event in stream_adapter(
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/adapters/agentscope/stream.py", line 58, in adapt_agentscope_message_stream
async for msg, last in source_stream:
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py", line 179, in _call_handler_streaming
async for item in result:
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/app/runner/runner.py", line 581, in query_handler
raise converted from e
agentscope_runtime.engine.schemas.exception.ModelTimeoutException: [422] MODEL_TIMEOUT: Model inference timed out: qwen, timeout limit: 60 seconds
(Details: /tmp/copaw_query_error_0edg9ra8.json)
(Details: /tmp/copaw_query_error_0edg9ra8.json)

`/root/manager-workspace/.copaw/copaw.log` -> `hiclaw/hiclaw-storage/manager/.copaw/copaw.log`
```

### Component

Manager Agent

### Version / Commit

_No response_

---
### Bug Description

Asked questions to the big model on the communication interface. The big model was unable to reply for a long time, and finally reported an error and timed out.

### Steps to Reproduce

Asked questions to the big model on the communication interface. The big model was unable to reply for a long time, and finally reported an error and timed out.

### AI Analysis

_No response_

### Relevant Logs

```shell
ERROR /opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py:342 | 2026-06-02 05:27:53 | {'code': 'MODEL_TIMEOUT', 'message': 'Model inference timed out: qwen, timeout limit: 60 seconds\n(Details: /tmp/copaw_query_error_0edg9ra8.json)'}: Traceback (most recent call last):
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/app/runner/runner.py", line 535, in query_handler
async for msg, last in stream_printing_messages(
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/pipeline/_functional.py", line 192, in stream_printing_messages
raise exception from None
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_base.py", line 455, in __call__
reply_msg = await self.reply(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/agents/react_agent.py", line 1026, in reply
return await super().reply(
^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/tracing/_trace.py", line 390, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_react_agent.py", line 437, in reply
msg_reasoning = await self._reasoning(tool_choice)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/agents/react_agent.py", line 693, in _reasoning
return await super()._reasoning(tool_choice=tool_choice)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/agents/tool_guard_mixin.py", line 646, in _reasoning
return await super()._reasoning( # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/agent/_react_agent.py", line 568, in _reasoning
res = await self.model(
^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/providers/retry_chat_model.py", line 312, in __call__
result = await self._inner(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/token_usage/model_wrapper.py", line 48, in __call__
result = await self._model(
^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/tracing/_trace.py", line 602, in async_wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope/model/_openai_model.py", line 291, in __call__
response = await self.client.chat.completions.create(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 2739, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/openai/_base_client.py", line 1931, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/copaw-venv/lib/python3.11/site-packages/openai/_base_client.py", line 1666, in request
raise APITimeoutError(request=request) from err
openai.APITimeoutError: Request timed out.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py", line 324, in stream_query
async for event in stream_adapter(
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/adapters/agentscope/stream.py", line 58, in adapt_agentscope_message_stream
async for msg, last in source_stream:
File "/opt/copaw-venv/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py", line 179, in _call_handler_streaming
async for item in result:
File "/opt/copaw-venv/lib/python3.11/site-packages/copaw/app/runner/runner.py", line 581, in query_handler
raise converted from e
agentscope_runtime.engine.schemas.exception.ModelTimeoutException: [422] MODEL_TIMEOUT: Model inference timed out: qwen, timeout limit: 60 seconds
(Details: /tmp/copaw_query_error_0edg9ra8.json)
(Details: /tmp/copaw_query_error_0edg9ra8.json)

`/root/manager-workspace/.copaw/copaw.log` -> `hiclaw/hiclaw-storage/manager/.copaw/copaw.log`
```

### Component

Manager Agent

### Version/Commit

_No response_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.