runtime.py 455 B

123456789101112131415
  1. """find_agent 本地运行参数(不属于通用 supply_agent 配置)。"""
  2. from __future__ import annotations
  3. import os
  4. def find_agent_timeout_seconds() -> float:
  5. """单次 find_agent 运行总超时(秒),可读环境变量 FIND_AGENT_TIMEOUT_SECONDS。"""
  6. raw = os.getenv("FIND_AGENT_TIMEOUT_SECONDS", "600")
  7. try:
  8. value = float(raw)
  9. except ValueError:
  10. value = 600.0
  11. return max(60.0, min(7200.0, value))