feat: 模型管理独立页与会话级选模型

This commit is contained in:
2026-09-20 15:42:25 +08:00
parent ffb8d5f7dc
commit aac3424911
24 changed files with 845 additions and 523 deletions
+7 -1
View File
@@ -52,7 +52,13 @@ class ChatService:
raise ValueError("消息不能为空")
session = await self._sessions.require_owned(actor, thread_id)
llm = await self._llm_runtime.resolve_runtime(actor.company_id)
llm = await self._llm_runtime.resolve_runtime(
actor.company_id, model=session.llm_model
)
# 会话未记模型或回落后写回,保证列表/选框有稳定值
if not session.llm_model or session.llm_model != llm.model:
session.llm_model = llm.model
await self._session_repo.update(session)
just_saved = await self._memory.maybe_capture_from_user(
actor, thread_id=thread_id, text=text
)