Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
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
Commit
286d3d80
authored
Feb 08, 2026
by
Calcium-Ion
Committed by
GitHub
Feb 08, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2895 from seefs001/fix/model-manager
fix: 如果模型管理有自定义配置则不合并默认配置
parents
aed8c07c
ac7b183b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
model/pricing.go
+11
-6
No files found.
model/pricing.go
View file @
286d3d80
...
@@ -196,20 +196,25 @@ func updatePricing() {
...
@@ -196,20 +196,25 @@ func updatePricing() {
modelSupportEndpointsStr
[
ability
.
Model
]
=
endpoints
modelSupportEndpointsStr
[
ability
.
Model
]
=
endpoints
}
}
// 再补充模型自定义端点
// 再补充模型自定义端点
:若配置有效则替换默认端点,不做合并
for
modelName
,
meta
:=
range
metaMap
{
for
modelName
,
meta
:=
range
metaMap
{
if
strings
.
TrimSpace
(
meta
.
Endpoints
)
==
""
{
if
strings
.
TrimSpace
(
meta
.
Endpoints
)
==
""
{
continue
continue
}
}
var
raw
map
[
string
]
interface
{}
var
raw
map
[
string
]
interface
{}
if
err
:=
json
.
Unmarshal
([]
byte
(
meta
.
Endpoints
),
&
raw
);
err
==
nil
{
if
err
:=
json
.
Unmarshal
([]
byte
(
meta
.
Endpoints
),
&
raw
);
err
==
nil
{
endpoints
:=
modelSupportEndpointsStr
[
modelName
]
endpoints
:=
make
([]
string
,
0
,
len
(
raw
))
for
k
:=
range
raw
{
for
k
,
v
:=
range
raw
{
if
!
common
.
StringsContains
(
endpoints
,
k
)
{
switch
v
.
(
type
)
{
endpoints
=
append
(
endpoints
,
k
)
case
string
,
map
[
string
]
interface
{}
:
if
!
common
.
StringsContains
(
endpoints
,
k
)
{
endpoints
=
append
(
endpoints
,
k
)
}
}
}
}
}
modelSupportEndpointsStr
[
modelName
]
=
endpoints
if
len
(
endpoints
)
>
0
{
modelSupportEndpointsStr
[
modelName
]
=
endpoints
}
}
}
}
}
...
...
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