Skip to content

fix(knowledge): 修复语言模型选择后无法回显且提交为空#672

Open
guoyi8 wants to merge 1 commit intoxerrors:mainfrom
guoyi8:fix/llm-model-select
Open

fix(knowledge): 修复语言模型选择后无法回显且提交为空#672
guoyi8 wants to merge 1 commit intoxerrors:mainfrom
guoyi8:fix/llm-model-select

Conversation

@guoyi8
Copy link
Copy Markdown

@guoyi8 guoyi8 commented May 1, 2026

Summary

  • V2 模型 spec 格式为 provider_id:model_id(冒号分隔),但 handleLLMSelect 使用斜杠拆分,导致 providermodel_name 均为空
  • 新增 model_spec 字段直接存储完整 spec,抽取 parseModelSpec/buildDisplaySpec 工具函数统一处理 V1/V2 两种格式
  • 涉及 3 个前端组件:新建表单、编辑表单(卡片)、编辑表单(头部)

Test plan

  • 新建 LightRAG 类型知识库,选择语言模型后验证回显正常
  • 编辑已有 LightRAG 知识库,切换语言模型后验证回显和保存
  • 验证已有知识库(旧 llm_info 格式)编辑时语言模型正常显示

V2 模型 spec 格式为 provider_id:model_id(冒号分隔),
但 handleLLMSelect 使用斜杠拆分,导致 provider 和 model_name 均为空。
新增 model_spec 字段直接存储完整 spec,抽取 parseModelSpec/buildDisplaySpec
工具函数统一处理 V1/V2 两种格式,消除 3 处重复逻辑。
@guoyi8 guoyi8 mentioned this pull request May 1, 2026
5 tasks
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.

1 participant