Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
e30f0e35
authored
May 14, 2026
by
Archer
Committed by
GitHub
May 14, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: defaultconfig (#6938)
parent
5e64f6c9
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
29 deletions
+68
-29
document/content/self-host/upgrading/4-14/41420.en.mdx
+16
-0
document/content/self-host/upgrading/4-14/41420.mdx
+16
-0
document/content/self-host/upgrading/4-14/meta.en.json
+1
-0
document/content/self-host/upgrading/4-14/meta.json
+1
-0
document/content/toc.en.mdx
+1
-0
document/content/toc.mdx
+1
-0
document/data/doc-last-modified.json
+2
-2
packages/service/core/ai/config/utils.ts
+16
-10
projects/app/src/pages/api/core/ai/model/update.ts
+8
-9
projects/app/src/pages/api/core/ai/model/updateWithJson.ts
+6
-8
No files found.
document/content/self-host/upgrading/4-14/41420.en.mdx
0 → 100644
View file @
e30f0e35
---
title: 'V4.14.20 (In Progress)'
description: 'FastGPT V4.14.20 release notes'
---
## Upgrade Guide
### 1. Update image tags
- Update the fastgpt-app image tag (FastGPT main service): v4.14.20
- Update the fastgpt-pro image tag (FastGPT commercial edition): v4.14.20
## 🐛 Fixes
1. Improved workflow Zod data type compatibility.
2. Fixed an issue where model configuration could not fully override `defaultConfig`.
document/content/self-host/upgrading/4-14/41420.mdx
0 → 100644
View file @
e30f0e35
---
title: 'V4.14.20(进行中)'
description: 'FastGPT V4.14.20 更新说明'
---
## 升级指南
### 1. 更新镜像 tag
- 更新 fastgpt-app(fastgpt 主服务) 镜像 tag: v4.14.20
- 更新 fastgpt-pro(fastgpt 商业版) 镜像 tag: v4.14.20
## 🐛 修复
1. 增强工作流 zod 数据类型适配性。
2. 模型配置,无法完全覆盖 defaultConfig。
document/content/self-host/upgrading/4-14/meta.en.json
View file @
e30f0e35
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
"title"
:
"4.14.x"
,
"title"
:
"4.14.x"
,
"description"
:
""
,
"description"
:
""
,
"pages"
:
[
"pages"
:
[
"41420"
,
"41419"
,
"41419"
,
"41418"
,
"41418"
,
"41417"
,
"41417"
,
...
...
document/content/self-host/upgrading/4-14/meta.json
View file @
e30f0e35
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
"title"
:
"4.14.x"
,
"title"
:
"4.14.x"
,
"description"
:
""
,
"description"
:
""
,
"pages"
:
[
"pages"
:
[
"41420"
,
"41419"
,
"41419"
,
"41418"
,
"41418"
,
"41417"
,
"41417"
,
...
...
document/content/toc.en.mdx
View file @
e30f0e35
...
@@ -128,6 +128,7 @@ description: FastGPT Toc
...
@@ -128,6 +128,7 @@ description: FastGPT Toc
- [/en/self-host/upgrading/4-14/41416](/en/self-host/upgrading/4-14/41416)
- [/en/self-host/upgrading/4-14/41416](/en/self-host/upgrading/4-14/41416)
- [/en/self-host/upgrading/4-14/41419](/en/self-host/upgrading/4-14/41419)
- [/en/self-host/upgrading/4-14/41419](/en/self-host/upgrading/4-14/41419)
- [/en/self-host/upgrading/4-14/4142](/en/self-host/upgrading/4-14/4142)
- [/en/self-host/upgrading/4-14/4142](/en/self-host/upgrading/4-14/4142)
- [/en/self-host/upgrading/4-14/41420](/en/self-host/upgrading/4-14/41420)
- [/en/self-host/upgrading/4-14/4143](/en/self-host/upgrading/4-14/4143)
- [/en/self-host/upgrading/4-14/4143](/en/self-host/upgrading/4-14/4143)
- [/en/self-host/upgrading/4-14/4144](/en/self-host/upgrading/4-14/4144)
- [/en/self-host/upgrading/4-14/4144](/en/self-host/upgrading/4-14/4144)
- [/en/self-host/upgrading/4-14/4145](/en/self-host/upgrading/4-14/4145)
- [/en/self-host/upgrading/4-14/4145](/en/self-host/upgrading/4-14/4145)
...
...
document/content/toc.mdx
View file @
e30f0e35
...
@@ -130,6 +130,7 @@ description: FastGPT 文档目录
...
@@ -130,6 +130,7 @@ description: FastGPT 文档目录
- [/self-host/upgrading/4-14/41418](/self-host/upgrading/4-14/41418)
- [/self-host/upgrading/4-14/41418](/self-host/upgrading/4-14/41418)
- [/self-host/upgrading/4-14/41419](/self-host/upgrading/4-14/41419)
- [/self-host/upgrading/4-14/41419](/self-host/upgrading/4-14/41419)
- [/self-host/upgrading/4-14/4142](/self-host/upgrading/4-14/4142)
- [/self-host/upgrading/4-14/4142](/self-host/upgrading/4-14/4142)
- [/self-host/upgrading/4-14/41420](/self-host/upgrading/4-14/41420)
- [/self-host/upgrading/4-14/4143](/self-host/upgrading/4-14/4143)
- [/self-host/upgrading/4-14/4143](/self-host/upgrading/4-14/4143)
- [/self-host/upgrading/4-14/4144](/self-host/upgrading/4-14/4144)
- [/self-host/upgrading/4-14/4144](/self-host/upgrading/4-14/4144)
- [/self-host/upgrading/4-14/4145](/self-host/upgrading/4-14/4145)
- [/self-host/upgrading/4-14/4145](/self-host/upgrading/4-14/4145)
...
...
document/data/doc-last-modified.json
View file @
e30f0e35
...
@@ -205,8 +205,8 @@
...
@@ -205,8 +205,8 @@
"content/self-host/migration/docker_mongo.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/migration/docker_mongo.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/attention.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/attention.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/attention.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/attention.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/faq.en.mdx"
:
"2026-05-12T1
6:38:31
+08:00"
,
"content/self-host/troubleshooting/faq.en.mdx"
:
"2026-05-12T1
8:16:10
+08:00"
,
"content/self-host/troubleshooting/faq.mdx"
:
"2026-05-12T1
6:38:31
+08:00"
,
"content/self-host/troubleshooting/faq.mdx"
:
"2026-05-12T1
8:16:10
+08:00"
,
"content/self-host/troubleshooting/methods.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/methods.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/methods.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/methods.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/model-errors.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
"content/self-host/troubleshooting/model-errors.en.mdx"
:
"2026-04-26T21:08:47+08:00"
,
...
...
packages/service/core/ai/config/utils.ts
View file @
e30f0e35
...
@@ -36,14 +36,14 @@ export const loadSystemModels = async (init = false, language = 'en') => {
...
@@ -36,14 +36,14 @@ export const loadSystemModels = async (init = false, language = 'en') => {
return
Promise
.
reject
(
error
);
return
Promise
.
reject
(
error
);
}
}
le
t
_systemModelList
:
SystemModelItemType
[]
=
[];
cons
t
_systemModelList
:
SystemModelItemType
[]
=
[];
le
t
_systemActiveModelList
:
SystemModelItemType
[]
=
[];
cons
t
_systemActiveModelList
:
SystemModelItemType
[]
=
[];
le
t
_llmModelMap
=
new
Map
<
string
,
LLMModelItemType
>
();
cons
t
_llmModelMap
=
new
Map
<
string
,
LLMModelItemType
>
();
le
t
_embeddingModelMap
=
new
Map
<
string
,
EmbeddingModelItemType
>
();
cons
t
_embeddingModelMap
=
new
Map
<
string
,
EmbeddingModelItemType
>
();
le
t
_ttsModelMap
=
new
Map
<
string
,
TTSModelType
>
();
cons
t
_ttsModelMap
=
new
Map
<
string
,
TTSModelType
>
();
le
t
_sttModelMap
=
new
Map
<
string
,
STTModelType
>
();
cons
t
_sttModelMap
=
new
Map
<
string
,
STTModelType
>
();
le
t
_reRankModelMap
=
new
Map
<
string
,
RerankModelItemType
>
();
cons
t
_reRankModelMap
=
new
Map
<
string
,
RerankModelItemType
>
();
le
t
_systemDefaultModel
:
SystemDefaultModelType
=
{};
cons
t
_systemDefaultModel
:
SystemDefaultModelType
=
{};
if
(
!
global
.
systemModelList
)
{
if
(
!
global
.
systemModelList
)
{
global
.
systemModelList
=
[];
global
.
systemModelList
=
[];
...
@@ -149,8 +149,14 @@ export const loadSystemModels = async (init = false, language = 'en') => {
...
@@ -149,8 +149,14 @@ export const loadSystemModels = async (init = false, language = 'en') => {
...(
model
.
type
===
ModelTypeEnum
.
llm
&&
dbModel
?.
metadata
?.
type
===
ModelTypeEnum
.
llm
...(
model
.
type
===
ModelTypeEnum
.
llm
&&
dbModel
?.
metadata
?.
type
===
ModelTypeEnum
.
llm
?
{
?
{
maxResponse
:
dbModel
?.
metadata
?.
maxResponse
??
model
.
maxTokens
??
8000
,
maxResponse
:
dbModel
?.
metadata
?.
maxResponse
??
model
.
maxTokens
??
8000
,
defaultConfig
:
mergeObject
(
model
.
defaultConfig
,
dbModel
?.
metadata
?.
defaultConfig
),
defaultConfig
:
fieldMap
:
mergeObject
(
model
.
fieldMap
,
dbModel
?.
metadata
?.
fieldMap
),
typeof
dbModel
?.
metadata
?.
defaultConfig
===
'object'
?
dbModel
?.
metadata
?.
defaultConfig
:
model
.
defaultConfig
,
fieldMap
:
typeof
dbModel
?.
metadata
?.
fieldMap
===
'object'
?
dbModel
?.
metadata
?.
fieldMap
:
model
.
fieldMap
,
/** @deprecated */
/** @deprecated */
maxTokens
:
undefined
maxTokens
:
undefined
}
}
...
...
projects/app/src/pages/api/core/ai/model/update.ts
View file @
e30f0e35
...
@@ -6,22 +6,16 @@ import { findModelFromAlldata } from '@fastgpt/service/core/ai/model';
...
@@ -6,22 +6,16 @@ import { findModelFromAlldata } from '@fastgpt/service/core/ai/model';
import
{
updatedReloadSystemModel
}
from
'@fastgpt/service/core/ai/config/utils'
;
import
{
updatedReloadSystemModel
}
from
'@fastgpt/service/core/ai/config/utils'
;
import
{
ModelTypeEnum
}
from
'@fastgpt/global/core/ai/constants'
;
import
{
ModelTypeEnum
}
from
'@fastgpt/global/core/ai/constants'
;
export
type
updateQuery
=
{};
export
type
updateBody
=
{
export
type
updateBody
=
{
model
:
string
;
model
:
string
;
metadata
?:
Record
<
string
,
any
>
;
metadata
?:
Record
<
string
,
any
>
;
};
};
export
type
updateResponse
=
{};
async
function
handler
(
req
:
ApiRequestProps
<
updateBody
>
,
res
:
ApiResponseType
<
any
>
)
{
async
function
handler
(
req
:
ApiRequestProps
<
updateBody
,
updateQuery
>
,
res
:
ApiResponseType
<
any
>
):
Promise
<
updateResponse
>
{
await
authSystemAdmin
({
req
});
await
authSystemAdmin
({
req
});
let
{
model
,
metadata
}
=
req
.
body
;
const
metadata
=
req
.
body
.
metadata
;
let
{
model
}
=
req
.
body
;
if
(
!
model
)
return
Promise
.
reject
(
new
Error
(
'model is required'
));
if
(
!
model
)
return
Promise
.
reject
(
new
Error
(
'model is required'
));
model
=
model
.
trim
();
model
=
model
.
trim
();
...
@@ -60,6 +54,11 @@ async function handler(
...
@@ -60,6 +54,11 @@ async function handler(
}
}
});
});
// 强制更新 defaultConfig 数据类型
if
(
'defaultConfig'
in
metadataConcat
&&
typeof
metadataConcat
.
defaultConfig
!==
'object'
)
{
metadataConcat
.
defaultConfig
=
{};
}
await
MongoSystemModel
.
updateOne
(
await
MongoSystemModel
.
updateOne
(
{
model
},
{
model
},
{
{
...
...
projects/app/src/pages/api/core/ai/model/updateWithJson.ts
View file @
e30f0e35
...
@@ -6,18 +6,11 @@ import { mongoSessionRun } from '@fastgpt/service/common/mongo/sessionRun';
...
@@ -6,18 +6,11 @@ import { mongoSessionRun } from '@fastgpt/service/common/mongo/sessionRun';
import
{
MongoSystemModel
}
from
'@fastgpt/service/core/ai/config/schema'
;
import
{
MongoSystemModel
}
from
'@fastgpt/service/core/ai/config/schema'
;
import
{
updatedReloadSystemModel
}
from
'@fastgpt/service/core/ai/config/utils'
;
import
{
updatedReloadSystemModel
}
from
'@fastgpt/service/core/ai/config/utils'
;
export
type
updateWithJsonQuery
=
{};
export
type
updateWithJsonBody
=
{
export
type
updateWithJsonBody
=
{
config
:
string
;
config
:
string
;
};
};
export
type
updateWithJsonResponse
=
{};
async
function
handler
(
req
:
ApiRequestProps
<
updateWithJsonBody
>
,
res
:
ApiResponseType
<
any
>
)
{
async
function
handler
(
req
:
ApiRequestProps
<
updateWithJsonBody
,
updateWithJsonQuery
>
,
res
:
ApiResponseType
<
any
>
):
Promise
<
updateWithJsonResponse
>
{
await
authSystemAdmin
({
req
});
await
authSystemAdmin
({
req
});
const
{
config
}
=
req
.
body
;
const
{
config
}
=
req
.
body
;
...
@@ -41,6 +34,11 @@ async function handler(
...
@@ -41,6 +34,11 @@ async function handler(
if
(
!
item
.
metadata
.
name
)
{
if
(
!
item
.
metadata
.
name
)
{
item
.
metadata
.
name
=
item
.
model
;
item
.
metadata
.
name
=
item
.
model
;
}
}
if
(
'defaultConfig'
in
item
.
metadata
&&
typeof
item
.
metadata
.
defaultConfig
!==
'object'
)
{
{
item
.
metadata
.
defaultConfig
=
{};
}
}
}
}
await
mongoSessionRun
(
async
(
session
)
=>
{
await
mongoSessionRun
(
async
(
session
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment