feat: 引入LLM场景路由与后台拓扑管理能力

变更项:

1. 新增 llm.scenes 场景路由层,支持 scene->backend 统一映射,并补充默认场景配置。

2. 扩展 LLMRegistry,新增 scene 解析逻辑;当声明 scene 时强制按场景路由结果生效,保持旧 backend 配置兼容。

3. 扩展后台 /api/system/llm_config 读写能力,支持 scenes 配置保存;新增插件 LLM 依赖扫描与拓扑数据输出。

4. 升级 system_llm 页面:新增场景路由管理区、插件依赖拓扑表,支持可视化查看 插件->scene->backend->provider。

5. 迁移核心插件配置到 scene 模式(保留兼容字段):dify/global_news/game_task/message_summary/ai_auto_response/member_context/douyu。

6. 调整部分插件初始化默认 llm_config,补充 scene 字段,确保后台场景切换可直接生效。
This commit is contained in:
liuwei
2026-04-20 14:36:56 +08:00
parent 09daaf956c
commit 7b6bd19781
14 changed files with 351 additions and 6 deletions

View File

@@ -4,7 +4,8 @@
enabled = true
[api]
backend = "dify_workflow_message_summary"
# 群总结能力改为场景路由,后台切换 summary.daily 即可统一切换实现。
scene = "summary.daily"
connect_timeout_seconds = 10
retry_delays_seconds = [10, 20]