feat: Add LLM call timeout configuration to agent frontend

- Add llm_call_timeout field to CustomAgentConfig TypeScript interface
- Add thinking field to CustomAgentConfig (for extended thinking support)
- Add UI control (number input) in AgentEditorModal for timeout configuration
  - Range: 0-600 seconds (0 = use global default)
  - Supports 60-600 seconds recommended range
- Add i18n translations in Chinese (zh-CN) and English (en-US)
  - Label: "LLM 调用超时" / "LLM Call Timeout"
  - Description with explanation of timeout behavior
  - Hint about default and unlimited wait implications
  - Placeholder with recommended range
- Initialize llm_call_timeout: 0 in formData (uses global default)

This completes the frontend support for per-agent LLM timeout configuration that was previously missing. The setting integrates with the existing three-tier configuration hierarchy:
1. Per-agent config (llm_call_timeout in custom_agents table)
2. Global config (agent.llm_call_timeout in config.yaml)
3. Hardcoded default (120 seconds)
This commit is contained in:
wizardchen
2026-04-28 15:08:24 +08:00
committed by lyingbug
parent 29a65cc250
commit b1fc0e18d9
4 changed files with 34 additions and 0 deletions
+2
View File
@@ -23,9 +23,11 @@ export interface CustomAgentConfig {
rerank_model_id?: string; // ReRank 模型 ID
temperature?: number;
max_completion_tokens?: number; // 最大生成token数(普通模式)
thinking?: boolean; // 是否启用思考模式(支持扩展思考的模型)
// ===== Agent模式设置 =====
max_iterations?: number; // 最大迭代次数
llm_call_timeout?: number; // LLM调用超时时间(秒)
allowed_tools?: string[]; // 允许的工具
reflection_enabled?: boolean; // 是否启用反思
// MCP服务选择模式:all=全部启用的MCP服务, selected=指定服务, none=不使用MCP