feat: 贯通 context_window 配置并按 token 预算裁剪对话历史

This commit is contained in:
2026-09-20 14:22:53 +08:00
parent 8251a57010
commit 4114b0b4fb
21 changed files with 307 additions and 42 deletions
@@ -0,0 +1,3 @@
-- 公司 LLM 配置增加上下文窗口(token),供 Agent 裁剪历史;可空=由 Agent 按模型名估计
ALTER TABLE `agent_company_llm_settings`
ADD COLUMN `context_window` int UNSIGNED NULL COMMENT '模型上下文窗口(token),空则 Agent 启发式' AFTER `model`;