feat: add baizhi model store provider for auto mode 支持百智云模型商店#1811
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
本 PR 在 PandaWiki 的“自动模式(auto mode)”链路中新增 百智云模型商店(BaiZhiCloudModelStore) 作为模型供应商选项,覆盖后端模型选择/校验/配置持久化与前端控制台的配置入口与提示文案,同时升级了相关依赖与 Swagger 文档以保持接口一致。
Changes:
- 后端:在自动模式下引入
auto_mode_provider,根据 provider 选择对应的 provider/baseURL,并同步更新 RAG store 的模型配置。 - 前端:admin 控制台新增/调整百智云模型商店配置项(默认切到 ModelStore),并增加“旧配置即将失效”的提示。
- 依赖与契约:升级 ModelKit 版本(Go/前端),并更新 Swagger 与生成的 TS 类型。
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| web/pnpm-lock.yaml | 锁文件更新,反映依赖升级(含 @ctzhian/modelkit 版本变更等)。 |
| web/admin/package.json | admin 端升级 @ctzhian/modelkit 到 2.14.2。 |
| web/admin/src/types/modelkit.d.ts | 为 @ctzhian/modelkit 补充/覆盖类型声明以适配新版本使用。 |
| web/admin/src/request/types.ts | 增加 BaiZhiCloudModelStore 枚举与 auto_mode_provider 字段的接口类型。 |
| web/admin/src/constant/enums.tsx | 新增 BaiZhiCloudModelStore 配置项,并调整旧 BaiZhiCloud 文案为“即将下线”。 |
| web/admin/src/components/System/component/ModelConfig.tsx | 自动模式保存时写入 auto_mode_provider=BaiZhiCloudModelStore,并识别 legacy 配置提示。 |
| web/admin/src/components/System/component/AutoModelConfig.tsx | 更新默认模型列表/获取 key 链接,并新增 legacy 配置失效提示区块。 |
| backend/go.mod | Go 端升级 github.com/chaitin/ModelKit/v2 到 2.14.2。 |
| backend/go.sum | 同步 Go 依赖校验和变更。 |
| backend/domain/model.go | 新增 ModelProviderBaiZhiCloudModelStore 常量。 |
| backend/domain/system_setting.go | ModelModeSetting 增加 AutoModeProvider 字段用于持久化。 |
| backend/consts/model.go | 更新自动模式默认模型与新增模型商店 baseURL 常量。 |
| backend/usecase/model.go | 自动模式按 provider/baseURL 构建模型与校验;切换模式时写入配置并更新 RAG 模型。 |
| backend/docs/swagger.yaml | Swagger 定义增加 auto_mode_provider 字段与新枚举值。 |
| backend/docs/swagger.json | Swagger JSON 同步更新。 |
| backend/docs/docs.go | swag 生成的 docs.go 同步更新。 |
Files not reviewed (2)
- backend/docs/docs.go: Generated file
- web/pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 标题
支持百智云模型商店
相关 Issue
变更类型
请勾选适用的变更类型:
变更内容
详细描述本次 PR 的具体变更内容:
测试情况
描述本次变更的测试情况:
其他说明
任何其他需要说明的事项: