Skip to content

Conversation

@jiangwel
Copy link
Collaborator

@jiangwel jiangwel commented Dec 25, 2025

修复模型切换时RAG模型更新逻辑错误

变更类型

请勾选适用的变更类型:

  • Bug 修复 (不兼容变更的修复)
  • 新功能 (不兼容变更的新功能)
  • 功能改进 (不兼容现有功能的改进)
  • 文档更新
  • 依赖更新
  • 重构 (不影响功能的代码修改)
  • 测试用例
  • CI/CD 配置变更
  • 其他 (请描述):

@jiangwel jiangwel force-pushed the chore-sync-rag-model branch from b63251a to 8b2c32c Compare December 25, 2025 09:20
@coltea coltea requested review from coltea and Copilot and removed request for coltea December 25, 2025 10:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the model switching logic where RAG models were being updated with incorrect settings. The fix ensures that RAG model updates occur before the configuration is persisted, using the old mode settings for proper state transition handling.

Key Changes

  • Reordered function calls in SwitchMode to update RAG models before persisting the new configuration
  • Refactored updateRAGModelsByMode function signature to explicitly pass old and new mode parameters instead of a settings object
  • Improved parameter clarity by renaming mode to newMode and extracting oldMode and isManualEmbeddingUpdated as separate parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

在模型配置组件中,根据模型的is_active状态动态显示不同的背景颜色、文字颜色和状态文本
@jiangwel jiangwel requested a review from KuaiYu95 December 25, 2025 11:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

当更新RAG模型时,如果找不到活跃模型且模型类型为必需类型(chat/embedding/rerank/analysis),则返回错误
@jiangwel jiangwel force-pushed the chore-sync-rag-model branch from c0e87a1 to 26e4337 Compare December 26, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants