feat: AI 助手模型管理(CRUD、会话绑定、自动化验收)

- Flyway V6:模型表、默认种子、ai_chat_session.model_id 回填
- 管理端 /api/admin/ai/models;用户端选模与新会话绑定
- 禁用模型后会话只读(5009);chat 按会话 modelCode 调 DashScope
- 前端 AiModels 页、助手模型选择器与 localStorage
- 单测、AiModelManagementApiIT、Playwright E2E;e2e Profile 关闭注解限流
- 技术实施文档与验收报告;移除过期冲突分析文档

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
nojava
2026-05-24 03:36:31 +08:00
parent 9cf811d8c1
commit 6c8b31e38a
58 changed files with 2693 additions and 556 deletions
@@ -53,7 +53,12 @@ public enum ErrorCode {
AI_CONTENT_REJECTED(5003, "AI 内容审核未通过"),
AI_CONTENT_TOO_SHORT(5004, "正文过短,无法生成摘要"),
AI_API_KEY_MISSING(5005, "AI 服务未配置 API Key"),
AI_CHAT_SESSION_FULL(5006, "当前会话已满 5 轮,请新建会话");
AI_CHAT_SESSION_FULL(5006, "当前会话已满 5 轮,请新建会话"),
AI_MODEL_CODE_DUPLICATE(5007, "模型编码已存在"),
AI_MODEL_NOT_AVAILABLE(5008, "模型不可用"),
AI_MODEL_DISABLED(5009, "该会话所用模型已停用,仅可查看历史"),
AI_MODEL_MUST_KEEP_ENABLED(5010, "须至少保留一个启用的模型"),
AI_MODEL_DEFAULT_REQUIRED(5011, "请先指定其它模型为默认后再删除");
private final int code;
private final String message;