Develop 1.4.0#7248
Draft
chanzhi82020 wants to merge 2271 commits into
Draft
Conversation
-generate_evaldatasetstage新增generateEvalJsonlFromDB,流式生成evalJSONL -finetunestage读取evalJSONL文件一并上传给SFTBridge -checkpoint类型新增evalDatasetFilePath字段 -embeddingK_VALUES扩展为[5,10,15,20],新增Hit@20/MRR@20指标 -TRAIN_EVAL_CONCURRENCY默认值调整为5,TRAIN_SEARCH_LIMIT调整为51200 -TrainDetailDrawer重构指标展示:embedding展示@20,rerank展示@10
- 在 `RefinedDataCard` 组件的两处操作按钮上添加 `px={'4px'}` 水平内边距
- 修正按钮文字与边框间距过窄的问题,改善视觉一致性
[FIX]API文件库 查看原文 修改 1. https://td.sangfor.com/#/defect/details/2026061000281 2. 针对连用的场景,增加chat时获取用户的逻辑,以实现文件权限过滤 连用场景:创建share链接时,开启免登陆,并设置认证url 参考:https://doc.fastgpt.io/zh-CN/openapi/share 自测 1. 该场景下检索时文件权限过滤 正常 2. 文件列表、文件详情、对话日志 查看原文 正常 查看合并请求 AI-PaaS/FastGPT!1216
…evelop-1.4.0') fix: create folder-type dataset error TD: https://td.sangfor.com/#/defect/details/2026060500201 查看合并请求 AI-PaaS/FastGPT!1218
fix: 2026061100093修复评测审计指标 查看合并请求 AI-PaaS/FastGPT!1222
…at-evalset-to-sftbridge' 到 'develop-1.4.0') feat(train):embedding展示hit@20、将评测集传递给SFTBridge选择ckpt -generate_evaldatasetstage新增generateEvalJsonlFromDB,流式生成evalJSONL -finetunestage读取evalJSONL文件一并上传给SFTBridge -checkpoint类型新增evalDatasetFilePath字段 -embeddingK_VALUES扩展为[5,10,15,20],新增Hit@20/MRR@20指标 -TRAIN_EVAL_CONCURRENCY默认值调整为5,TRAIN_SEARCH_LIMIT调整为51200 -TrainDetailDrawer重构指标展示:embedding展示@20,rerank展示@10 查看合并请求 AI-PaaS/FastGPT!1211
…ix/2026060900426' 到 'develop-1.4.0') feat: clear collaborators when private model becomes public Summary 私有模型手动变更为公开模型时,自动删除协作者配置。 Changes - 模型更新 API (core/ai/model/update.ts):当 isShared=true 时,调用 replaceResourceClbs 并传入空数组清除所有协作者 - 复用 collaborator/update.ts 已有的 replaceResourceClbs 函数,保证 owner 权限记录不被误删 - 使用 mongoSessionRun 包裹事务操作 Test Plan - [x] pnpm typecheck 通过 - [x] test/cases/service/support/permission/model/auth.test.ts (7 tests) 全部通过 查看合并请求 AI-PaaS/FastGPT!1224
feat: 重构知识库详情内的检索测试 Tab 查看合并请求 AI-PaaS/FastGPT!1217
feat: 新增支持用户导入 查看合并请求 AI-PaaS/FastGPT!1225
…y30010-140-fix-21' 到 'develop-1.4.0') [FIX]dataset_datas validation failed: q: Path is required 问题 上传image文件时报错 原因 1. 重构前,数据是在 worker 队列中用 insertMany 创建的,Mongoose insertMany 默认不运行 validators;改用 Model.create() 在 API 请求中同步创建草稿数据,而 Model.create() 会运行 validators,空字符串 "" 被 String 类型的 required: true 拒绝 2. 代码中很多 q || '',设计之初应该是允许空字符串 3. 性能几乎没有影响,Mongoose 内部对 required: true的处理,本质也是调用一个函数来判断是否满足条件 ———— by AI 自测 上传image文件没有报错 查看合并请求 AI-PaaS/FastGPT!1226
- 在创建知识库模态框中新增可折叠的“知识处理”配置区域,支持通用、API数据集、飞书、语雀类型 - 新增四个布尔字段:keep_header_footer(保留页眉页脚)、keep_appendix(保留附录)、seal_rec(印章识别)、chart_analysis(统计图转表格) - 更新前端类型 CreateDatasetParams 及 OpenAPI 创建/更新请求体的 Schema - 扩展 MongoDB DatasetSchema,新增对应字段并设默认值 false - 补充中、英、繁三种语言环境下的国际化提示文本
将 chatAgent 类型加入导出为 Skill 的资格检查,使 Agent 类型应用在 /dashboard/agent 页面也能导出为 Skill。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 新增 `show_direct_database` 配置项,控制知识库创建时是否显示直连数据库选项 - 在知识库列表页根据配置动态渲染:开启时展示包含文件数据库和直连数据库的子菜单;关闭时仅展示文件数据库作为一级选项 - 更新英文、简体中文、繁体中文的多语言翻译及提示文本
…报错 ('hxy30010-140-fix-2026060400374-3' 到 'develop-1.4.0')
[FIX]dataset_datas validation failed: q: Path is required 类型检查报错
问题
pro流水线报错了
自测
insertData、上传image文件 正常
查看合并请求 AI-PaaS/FastGPT!1230
…ency - Replace inline app type arrays with AppTypeList.includes() for both 'go_to_chat' and 'export skill' menu conditions - This ensures chatAgent type apps get the 'go_to_chat' menu entry, fixing inconsistent menu behavior compared to other chat app types Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…op-1.4.0') feat: Agent 类型应用支持导出为 Skill 将 chatAgent 类型加入导出为 Skill 的资格检查,使 Agent 类型应用在 /dashboard/agent 页面也能导出为 Skill。 改动 - projects/app/src/pageComponents/dashboard/agent/AppCard.tsx: 在导出为 Skill 的类型资格检查中添加 AppTypeEnum.chatAgent 验证 - TypeScript 类型检查通过 - i18n 检查通过 - lint & format 通过 - 生产构建成功 🤖 Generated with Claude Code 查看合并请求 AI-PaaS/FastGPT!1229
…ction - Add resourceContext parameter to authModel/authModels to bypass model permission check when user accesses the model through a shared app/dataset - Add findReferencingResources to detect apps/datasets referencing a model before revocation, returning 409 with reference list - Return full modelNameMap from getInitData without permission filtering for usage detail display - Add i18n key model_referenced_by_resources (zh-CN/en/zh-Hant) - Suppress model permission warning for app collaborators
…n detection ('fix/implicit-model-auth-via-app-dataset' 到 'develop-1.4.0')
feat: implicit model auth via app/dataset context and revocation detection
Summary
支持应用/知识库权限自动带上私有模型权限,协作者可通过共享资源使用创建者的私有模型,并增加模型权限回收时的引用检测。
Changes
- 核心:authModel/authModels 新增 resourceContext 参数,当模型已存在
于用户有权限访问的应用/知识库中时,自动跳过独立的模型权限检查
- 新增:model/reference.ts — findReferencingResources() 查找引用指定
模型且有协作者的资源,返回 409 + 引用列表
- 后端 API:app/update、app/version/publish、dataset/update、
dataset/searchTest、dataset/custom/searchApi、dataset/database/searchTest、
dataset/training/rebuildEmbedding 传递 resourceContext
- 模型删除/更新:model/delete 和 model/update 在操作前检测引用,
有协作者引用时返回 409 阻止操作
- 使用详情:getInitData 返回全量 modelNameMap(无权限过滤),
UsageDetail.tsx 从 store 读取,解决协作者无法看到模型名称的问题
- 前端优化:协作者编辑应用时不再弹出模型权限不足警告;
模型删除/设为私有时展示引用资源列表 Toast
- 国际化:新增 model_referenced_by_resources 词条(zh-CN/en/zh-Hant)
Test Plan
- [x] pnpm typecheck 通过
- [x] test/cases/service/support/permission/model/auth.test.ts — 7 tests passed
- [x] test/cases/global/core/workflow/utils.test.ts — 90 tests passed
- [x] 创建应用用私有模型 → 添加协作者 → 协作者更新/发布不报错
- [x] 协作者查看使用详情能正确显示私有模型名称
- [x] 模型被引用时删除弹 Toast 警告
Related Issues
需求:知识库/应用权限自动带上私有模型权限 + 模型回收时引用检测
查看合并请求 AI-PaaS/FastGPT!1227
…lop-1.4.0')
fix(ui): 为知识库分块数据卡片的操作按钮添加水平内边距
- 在 RefinedDataCard 组件的两处操作按钮上添加 px={'4px'} 水平内边距
- 修正按钮文字与边框间距过窄的问题,改善视觉一致性
查看合并请求 AI-PaaS/FastGPT!1219
…velop-1.4.0') feat: 添加直连数据库开关配置,动态显示创建知识库时的数据库类型选项 - 新增 show_direct_database 配置项,控制知识库创建时是否显示直连数据库选项 - 在知识库列表页根据配置动态渲染:开启时展示包含文件数据库和直连数据库的子菜单;关闭时仅展示文件数据库作为一级选项 - 更新英文、简体中文、繁体中文的多语言翻译及提示文本 查看合并请求 AI-PaaS/FastGPT!1223
maxQuantity 参数误放在 GET 的 params 位置(第二个参数),导致被 序列化为 URL 查询参数,去重逻辑 checkMaxQuantity 无法读取到该值。 移入 config 位置(第三个参数),与 getTokenLogin 保持一致。
…develop-1.4.0') fix: 修复 getTeamPlanStatus 请求去重失效问题 maxQuantity 参数误放在 GET 的 params 位置(第二个参数),导致被 序列化为 URL 查询参数,去重逻辑 checkMaxQuantity 无法读取到该值。 移入 config 位置(第三个参数),与 getTokenLogin 保持一致。 查看合并请求 AI-PaaS/FastGPT!1233
…op-1.4.0') fix: 2026061000344修复直连数据库无法测试使用问题 修复内容 https://td.sangfor.com/#/defect/details/2026061000344 修复:2026061000344 查看合并请求 AI-PaaS/FastGPT!1234
…op-1.4.0') feat: 编辑模式下隐藏数据库密码可见性切换按钮 - 编辑模式下隐藏密码字段的可见性切换图标,防止误操作 - 编辑模式下强制密码输入框始终为密码类型,提升安全性 - 非编辑模式下保持原有密码可见性切换功能 查看合并请求 AI-PaaS/FastGPT!1338
…0161' 到 'develop-1.4.0') fix(2026062700161): 默认启用附录保留并明确知识处理仅针对PDF - 将 DatasetSchema 中 keep_appendix 字段默认值从 false 改为 true - 更新中、英、繁三语 knowledge_process 文案为“知识处理(仅针对PDF)”,明确功能适用范围 查看合并请求 AI-PaaS/FastGPT!1340
…6' 到 'develop-1.4.0') fix: 2026062900056扩大node内存,防止execl解析过大返回导致重启 查看合并请求 AI-PaaS/FastGPT!1343
- 移除 `ModelConfigTable.tsx` 中已无效的 `formatList.sort((a, b) => a.order - b.order)` 前端排序 - 在 API 层 `list.ts` 新增排序逻辑:已启用模型优先,再按提供商 `order` 字段排序 - 使用 `getModelProvider()` 获取提供商排序信息,确保排序一致性
- 在 `ConversationLogs` 父组件中新增 `refreshKey` 状态和 `visibilitychange` 事件监听,当标签页从不可见变为可见时递增计数器 - `LogList` 和 `OptimizeRecords` 子组件接收 `refreshKey` prop,并将其编入各自的 `refreshDeps` 数组,触发数据自动刷新 - 同步为 `Logs` 页面(应用日志)添加相同的 visibility 刷新逻辑,保持行为一致 - 仅影响对话日志和应用日志页面,不改变其他 tab 或页面的刷新行为
Including: DiTing, dataset search, LLM judge, eval) continued issuing requests unaware of task deletion. - Processor layer: ensureTaskNotAborted check between stages - Stage internals: abort check at each pLimit callback entry point
…99' 到 'develop-1.4.0') fix(2026062900299): 修复模型列表排序逻辑并移除前端冗余排序 - 移除 ModelConfigTable.tsx 中已无效的 formatList.sort((a, b) => a.order - b.order) 前端排序 - 在 API 层 list.ts 新增排序逻辑:已启用模型优先,再按提供商 order 字段排序 - 使用 getModelProvider() 获取提供商排序信息,确保排序一致性 查看合并请求 AI-PaaS/FastGPT!1345
…t-check-all-training-stages' 到 'develop-1.4.0') feat: add task abort checks to all training stages Feature: DiTing、数据集搜索、LLM 评测、评估)在任务被删除的情况下持续发出请求。 - Processor layer: ensureTaskNotAborted check between stages - Stage internals: abort check at each pLimit callback entry point Fix: 当 force delete 发生时, abort 信号被正确传播, worker 会抛出 TrainTaskUnrecoverableError(如 rerankTaskNotExist) → BullMQ 不再重试, 不会出现先报 generation failed → 重试报 task not found的双重错误日志。 自测. 2026-06-30 06:06:04 → 生成训练数据中,前端删除任务 FG后端log: DITING后端log → 处理完当前批次request后未新增,符合预期 查看合并请求 AI-PaaS/FastGPT!1330
- 在 `HumanContentCard` 组件中新增 `isChatLog` 属性,用于区分聊天日志与实时对话场景 - 聊天日志中保留压缩标记(`Badge` 替换为 `MyTag`)和压缩后文本(`displayText`)的展示 - 实时对话中隐藏压缩标记,直接展示原始内容(`originalContent` 或 `text`),避免用户看到截断提示 - 优化压缩标记样式:按钮改为链接样式,并设置主色 - 更新 `React.memo` 比较逻辑,将 `isChatLog` 纳入依赖,避免不必要的重渲染 - 移除 `compressLargeContent` 中截断后的省略号提示文本,仅保留前半部分内容
…velop-1.4.0') feat(对话日志): 浏览器标签页切回时自动刷新当前子 tab 数据 - 在 ConversationLogs 父组件中新增 refreshKey 状态和 visibilitychange 事件监听,当标签页从不可见变为可见时递增计数器 - LogList 和 OptimizeRecords 子组件接收 refreshKey prop,并将其编入各自的 refreshDeps 数组,触发数据自动刷新 - 同步为 Logs 页面(应用日志)添加相同的 visibility 刷新逻辑,保持行为一致 - 仅影响对话日志和应用日志页面,不改变其他 tab 或页面的刷新行为 查看合并请求 AI-PaaS/FastGPT!1341
- 新增 `getErrorCountMap()` 函数,从 training 表实时聚合每个 collection 的错误计数(与 detail 接口逻辑一致)
- 在 `listV2.ts` 的四个排序/筛选分支中,将原先依赖预计算字段 `item.errorCount` 替换为实时聚合结果
- 修复 `getDatasetTrainingQueue.ts` 中错误计数条件:将 `errorMsg: { $exists: true, $ne: null }` 改为 `{ $exists: true }`,并增加 `retryCount: { $lte: 0 }` 过滤,确保只统计已耗尽重试次数的错误记录
…' 到 'develop-1.4.0') fix(2026062900401): 区分聊天日志与实时对话中用户消息的展示逻辑 - 在 HumanContentCard 组件中新增 isChatLog 属性,用于区分聊天日志与实时对话场景 - 聊天日志中保留压缩标记(Badge 替换为 MyTag)和压缩后文本(displayText)的展示 - 实时对话中隐藏压缩标记,直接展示原始内容(originalContent 或 text),避免用户看到截断提示 - 优化压缩标记样式:按钮改为链接样式,并设置主色 - 更新 React.memo 比较逻辑,将 isChatLog 纳入依赖,避免不必要的重渲染 - 移除 compressLargeContent 中截断后的省略号提示文本,仅保留前半部分内容 查看合并请求 AI-PaaS/FastGPT!1346
- 新增 `getAllDescendantIds` 工具函数,通过 BFS 遍历获取当前文件夹及其所有子孙文件夹 ID - 重构应用、技能、知识库列表搜索查询,将搜索范围限定到当前文件夹及其子孙文件夹 - 修复搜索时权限 `$or` 与搜索 `$or` 被后者覆盖的问题,改用 `$and` 合并两者 - 为 `listWithChildren` 接口同步应用相同逻辑,确保知识库子列表搜索行为一致 - 添加 `getAllDescendantIds` 的单元测试,覆盖无子节点、单层和多层嵌套场景
…026061500082-3' 到 'develop-1.4.0')
fix(2026061500082): 修复集合列表 errorCount 实时统计与训练队列错误计数逻辑
- 新增 getErrorCountMap() 函数,从 training 表实时聚合每个 collection 的错误计数(与 detail 接口逻辑一致)
- 在 listV2.ts 的四个排序/筛选分支中,将原先依赖预计算字段 item.errorCount 替换为实时聚合结果
- 修复 getDatasetTrainingQueue.ts 中错误计数条件:将 errorMsg: { $exists: true, $ne: null } 改为 { $exists: true },并增加 retryCount: { $lte: 0 } 过滤,确保只统计已耗尽重试次数的错误记录
查看合并请求 AI-PaaS/FastGPT!1347
…-1.4.0') feat: 支持在文件夹内递归搜索应用/技能/知识库 - 新增 getAllDescendantIds 工具函数,通过 BFS 遍历获取当前文件夹及其所有子孙文件夹 ID - 重构应用、技能、知识库列表搜索查询,将搜索范围限定到当前文件夹及其子孙文件夹 - 修复搜索时权限 $or 与搜索 $or 被后者覆盖的问题,改用 $and 合并两者 - 为 listWithChildren 接口同步应用相同逻辑,确保知识库子列表搜索行为一致 查看合并请求 AI-PaaS/FastGPT!1339
…ataset-training-status-tracking' 到 'develop-1.4.0') feat:improve dataset training status tracking~ Summary Improve dataset training trace and collection status update consistency. Changes - Preserve insufficient-quota training errors for UI visibility - Refresh collection stats after terminal, skipped, and exhausted retry paths - Fix training detail counts to separate active and errored tasks - Sync fastgpt-pro training workers with the same status update behavior - Add balance failure coverage for training queues Test Plan - [x] pnpm typecheck - [x] MONGODB_TEST_URI=... pnpm test projects/app/test/api/core/dataset/training/balanceCheck.test.ts 查看合并请求 AI-PaaS/FastGPT!1348
… 'develop-1.4.0') agent base需求:langfuse设置trace的name固定为messgae 查看合并请求 AI-PaaS/FastGPT!1350
…evelop-1.4.0') fix: add app id to langfuse observations 查看合并请求 AI-PaaS/FastGPT!1352
- 更新所有技能文件的 `generatedBy` 版本从 `1.3.1` 到 `1.4.1` - 在 `openspec-apply-change` 技能中添加工作区守卫逻辑,当 `actionContext.mode` 为 `"workspace-planning"` 且 `allowedEditRoots` 为空时停止操作 - 在 `openspec-archive-change` 技能中,使用 `planningHome.changesDir` 替代硬编码的 `openspec/changes/archive` 路径,并添加工作区规划模式检查 - 在 `openspec-explore` 技能中,通过 `openspec status --json` 获取 `changeRoot`、`artifactPaths` 和 `actionContext` 来读取现有工件 - 在 `openspec-propose` 技能中,使用 `resolvedOutputPath` 替代 `outputPath`,并引用 `planningHome`、`changeRoot`、`artifactPaths` 和 `actionContext` 作为路径上下文 - 在 `openspec-sync-specs` 技能中,通过 `openspec status --json` 获取 `artifactPaths.specs.existingOutputPaths` 来查找 delta 规范,并添加工作区规划模式检查 - 在 `openspec-verify-change` 技能中,添加工作区规划模式检查,并使用 `contextFiles.specs` 替代硬编码路径 - 更新 `CLAUDE.md` 中的国际化描述,将 "日文" 改为 "繁体中文"
…('fix/unify-terminal-error-semantics-in-dataset-training-status' 到 'develop-1.4.0')
fix: unify terminal-error semantics in dataset training status
fix: unify terminal-error semantics in dataset training status
- Count only terminal errors (retryCount<=0 + errorMsg) for
hasError/errorCount across mq worker, listV2 and getTrainingError
- Fix trainingDetail: filter active tasks for minId, count only
indexed data for trainedCount, add terminalErrorMatch
- Extract training/data aggregation pipelines as reusable builders
- Add unit tests for aggregation pipelines and getFileStatus
查看合并请求 AI-PaaS/FastGPT!1351
- 将 `requestAuth` 字段的输入框类型改为 `password`,以隐藏敏感认证信息
…velop-1.4.0') feat(openspec): 更新技能文件以支持工作区规划模式 - 更新所有技能文件的 generatedBy 版本从 1.3.1 到 1.4.1 - 在 openspec-apply-change 技能中添加工作区守卫逻辑,当 actionContext.mode 为 "workspace-planning" 且 allowedEditRoots 为空时停止操作 - 在 openspec-archive-change 技能中,使用 planningHome.changesDir 替代硬编码的 openspec/changes/archive 路径,并添加工作区规划模式检查 - 在 openspec-explore 技能中,通过 openspec status --json 获取 changeRoot、artifactPaths 和 actionContext 来读取现有工件 - 在 openspec-propose 技能中,使用 resolvedOutputPath 替代 outputPath,并引用 planningHome、changeRoot、artifactPaths 和 actionContext 作为路径上下文 - 在 openspec-sync-specs 技能中,通过 openspec status --json 获取 artifactPaths.specs.existingOutputPaths 来查找 delta 规范,并添加工作区规划模式检查 - 在 openspec-verify-change 技能中,添加工作区规划模式检查,并使用 contextFiles.specs 替代硬编码路径 - 更新 CLAUDE.md 中的国际化描述,将 "日文" 改为 "繁体中文" 查看合并请求 AI-PaaS/FastGPT!1354
…1.4.0') feat(模型配置): 自定义请求 Key 输入框密文显示 - 将 requestAuth 字段的输入框类型改为 password,以隐藏敏感认证信息 查看合并请求 AI-PaaS/FastGPT!1355
|
熊涛10037 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
1 similar comment
|
熊涛10037 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
No description provided.