fix(ai写作): 技能检索超时硬编码 5 分钟(内网慢检索不被过早切断)
内网检索很慢,原 120s 在三个真正生效的层把检索切断。统一硬编码 300s, 不依赖环境变量(部署方不一定会配): - researcher._SKILL_SEARCH_TIMEOUT_SECONDS:120(env) → 300(写死),删掉 _env_int; 作用于直连/定向技能检索的 wait_for,也传给真实智能体路径。 - IntranetSearchProvider 默认 httpx 超时:120 → 300(直连内网 ES 的真正瓶颈)。 - run_skill_via_real_agent 整段运行上限:max(timeout_s, 300),至少 5 分钟。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
4f68235c94
commit
d8b43e7579
3 files changed
+13
-16
No files matched your search
+2
-2
@@ -27,12 +27,12 @@ class IntranetSearchProvider(BaseSearchProvider):
|
||||
self,
|
||||
base_url: str = "",
|
||||
knowledge_base_name: str = _DEFAULT_KB,
|
||||
timeout: int = 120,
|
||||
timeout: int = 300,
|
||||
**_ignored,
|
||||
):
|
||||
self.endpoint = base_url or _DEFAULT_ENDPOINT
|
||||
self.knowledge_base_name = knowledge_base_name or _DEFAULT_KB
|
||||
# 内网 ES 接口可能较慢,超时放宽到 2 分钟
|
||||
# 内网 ES 接口很慢,超时硬编码放宽到 5 分钟(不依赖 env 配置)
|
||||
self.timeout = timeout
|
||||
# 收集本次运行的检索异常,供 researcher 节点取出并提示用户(ES 波动等)
|
||||
self.errors: list[str] = []
|
||||
|
||||
Reference in new issue
Block a user