agent-Specialization/config/custom_models.json
JOJO e2bbd767f7 feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX
This commit consolidates a large set of host-mode security and UX fixes across backend and frontend.

Security / execution model:
- Make permission/execution mode switches apply immediately (no deferred pending-only behavior).
- Keep runtime mode change notices durable and visible via user-message guidance path.
- Add explicit runtime message source taxonomy support and persistence:
  user / presend / guidance / notify / sub_agent / background_command.
- Ensure guidance/notify insertion is batched per tool-cycle so mid-run inserts are committed together.
- Separate notify from guidance semantics for mode-change notices.
- Add direct-mode auto-fallback handling visibility on frontend.

Approval and command gating:
- Align run_command approval pre-check logic with docker behavior for approval/auto_approval modes in host execution paths.
- Keep approval retry flow and final-result semantics intact when permission errors trigger approval.
- Externalize forbidden command keyword list into JSON config:
  config/forbidden_commands.json.
- Update forbidden command rejection message to user-facing wording:
  用户不允许执行包含“... ”的指令.

Prompt/runtime guidance:
- Refine execution-mode runtime rule text to avoid endless workaround loops:
  one safe alternative first, then request switching to direct mode when truly required.

Chat rendering / message UX:
- Prevent injected guidance/notify user-messages from incorrectly triggering assistant work header/timer chain.
- Restore correct visibility after history reload while preserving runtime-source behavior.
- Update user-header icon/label rendering by message source:
  - guidance -> 引导 + navigation icon
  - notify/sub_agent/background_command -> 通知 + bell icon
  - user/presend -> keep normal user header.
- Add new icons: static/icons/navigation.svg, static/icons/bell.svg.

Approval panel UX:
- Convert desktop approval panel from layout-compress sidebar to overlay + blur sheet.
- Fix panel transition behavior (remove unintended vertical motion; use dedicated desktop overlay transition).
- Improve approval result display:
  - decision and reason split lines,
  - green/red status styling,
  - multiline reason rendering,
  - auto-collapse delay adjusted to 3s.

Execution mode TTL feedback:
- When direct mode auto-expires to sandbox, frontend menu state is updated from status snapshot.
- Show non-auto-dismiss warning toast to explicitly notify auto-fallback.

Misc consistency updates:
- Execution mode label text cleanup in composer.
- Runtime notice wording normalization (权限模式修改为..., 执行环境修改为...).

Build/test notes:
- Frontend rebuilt after UI changes.
- Smoke tests passed for server refactor path.
2026-05-12 19:16:38 +08:00

145 lines
5.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"models": [
{
"model_name": "kimi-k2.6",
"description": "Kimi-k2.6(测试别名),配置与 Kimi-k2.5 一致",
"visible": true,
"url": "${API_BASE_KIMI}",
"apikey": "${API_KEY_KIMI}",
"multimodal": "image,video",
"reasoning_capability": "fast,thinking",
"context_window": 256000,
"max_output_tokens": 32768,
"thinkmode_status": {
"type": "param_toggle",
"model_id": "kimi-k2.5",
"fast_extra_parameter": {
"thinking": {
"type": "disabled"
}
},
"thinking_extra_parameter": {
"thinking": {
"type": "enabled"
},
"enable_thinking": true
}
},
"extra_parameter": {},
"model_description": "你的基础模型是 Kimi-k2.6(测试别名),底层与 Kimi-k2.5 一致,并通过 thinking 参数开启/关闭思考能力。"
},
{
"model_name": "DeepSeek-V4-Flash Max",
"description": "DeepSeek V4 Flashreasoning_effort=max支持快速/思考/深度思考",
"visible": true,
"url": "${API_BASE_DEEPSEEK}",
"apikey": "${API_KEY_DEEPSEEK}",
"multimodal": "none",
"reasoning_capability": "fast,thinking",
"context_window": 1000000,
"max_output_tokens": 384000,
"thinkmode_status": {
"type": "param_toggle",
"model_id": "deepseek-v4-flash",
"fast_extra_parameter": {
"thinking": {
"type": "disabled"
}
},
"thinking_extra_parameter": {
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max"
}
},
"extra_parameter": {},
"model_description": "你是DeepSeek-V4-Flash一个快捷、高效的通用模型具备接近旗舰级的推理能力在简单到中等复杂度任务中表现出色并支持 1M 上下文,适合追求响应速度与成本效率的使用场景。"
},
{
"model_name": "DeepSeek-V4-Flah High",
"description": "DeepSeek V4 Flashreasoning_effort=high支持快速/思考/深度思考",
"visible": true,
"url": "${API_BASE_DEEPSEEK}",
"apikey": "${API_KEY_DEEPSEEK}",
"multimodal": "none",
"reasoning_capability": "fast,thinking",
"context_window": 1000000,
"max_output_tokens": 384000,
"thinkmode_status": {
"type": "param_toggle",
"model_id": "deepseek-v4-flash",
"fast_extra_parameter": {
"thinking": {
"type": "disabled"
}
},
"thinking_extra_parameter": {
"thinking": {
"type": "enabled"
},
"reasoning_effort": "high"
}
},
"extra_parameter": {},
"model_description": "你是DeepSeek-V4-Flash一个快捷、高效的通用模型具备接近旗舰级的推理能力在简单到中等复杂度任务中表现出色并支持 1M 上下文,适合追求响应速度与成本效率的使用场景。"
},
{
"model_name": "DeepSeek-V4-Pro Max",
"description": "DeepSeek V4 Proreasoning_effort=max支持快速/思考/深度思考",
"visible": true,
"url": "${API_BASE_DEEPSEEK}",
"apikey": "${API_KEY_DEEPSEEK}",
"multimodal": "none",
"reasoning_capability": "fast,thinking",
"context_window": 1000000,
"max_output_tokens": 384000,
"thinkmode_status": {
"type": "param_toggle",
"model_id": "deepseek-v4-pro",
"fast_extra_parameter": {
"thinking": {
"type": "disabled"
}
},
"thinking_extra_parameter": {
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max"
}
},
"extra_parameter": {},
"model_description": "你是DeepSeek-V4-Pro一个面向复杂任务的高性能通用模型具备突出的 Agent 能力、丰富的世界知识和顶级推理表现在编程、数学、STEM 与复杂问题分析场景中表现尤为出色,并支持 1M 上下文。"
},
{
"model_name": "DeepSeek-V4-Pro High",
"description": "DeepSeek V4 Proreasoning_effort=high支持快速/思考/深度思考",
"visible": true,
"url": "${API_BASE_DEEPSEEK}",
"apikey": "${API_KEY_DEEPSEEK}",
"multimodal": "none",
"reasoning_capability": "fast,thinking",
"context_window": 1000000,
"max_output_tokens": 384000,
"thinkmode_status": {
"type": "param_toggle",
"model_id": "deepseek-v4-pro",
"fast_extra_parameter": {
"thinking": {
"type": "disabled"
}
},
"thinking_extra_parameter": {
"thinking": {
"type": "enabled"
},
"reasoning_effort": "high"
}
},
"extra_parameter": {},
"model_description": "你是DeepSeek-V4-Pro一个面向复杂任务的高性能通用模型具备突出的 Agent 能力、丰富的世界知识和顶级推理表现在编程、数学、STEM 与复杂问题分析场景中表现尤为出色,并支持 1M 上下文。"
}
]
}