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
Unverified
Commit
3bda738e
authored
Apr 09, 2026
by
Seefs
Committed by
GitHub
Apr 09, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: prefer explicit pricing for compact models (#4156)
parent
160cb285
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
setting/ratio_setting/model_ratio.go
+7
-7
No files found.
setting/ratio_setting/model_ratio.go
View file @
3bda738e
...
...
@@ -361,6 +361,10 @@ func UpdateModelPriceByJSONString(jsonStr string) error {
func
GetModelPrice
(
name
string
,
printErr
bool
)
(
float64
,
bool
)
{
name
=
FormatMatchingModelName
(
name
)
if
price
,
ok
:=
modelPriceMap
.
Get
(
name
);
ok
{
return
price
,
true
}
if
strings
.
HasSuffix
(
name
,
CompactModelSuffix
)
{
price
,
ok
:=
modelPriceMap
.
Get
(
CompactWildcardModelKey
)
if
!
ok
{
...
...
@@ -372,14 +376,10 @@ func GetModelPrice(name string, printErr bool) (float64, bool) {
return
price
,
true
}
price
,
ok
:=
modelPriceMap
.
Get
(
name
)
if
!
ok
{
if
printErr
{
common
.
SysError
(
"model price not found: "
+
name
)
}
return
-
1
,
false
if
printErr
{
common
.
SysError
(
"model price not found: "
+
name
)
}
return
price
,
tru
e
return
-
1
,
fals
e
}
func
UpdateModelRatioByJSONString
(
jsonStr
string
)
error
{
...
...
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