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
df6d8628
authored
Apr 24, 2026
by
yesone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: correct gpt-5.5 completion ratio
parent
65b16547
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
setting/ratio_setting/model_ratio.go
+3
-0
setting/ratio_setting/model_ratio_test.go
+22
-0
No files found.
setting/ratio_setting/model_ratio.go
View file @
df6d8628
...
...
@@ -515,6 +515,9 @@ func getHardcodedCompletionModelRatio(name string) (float64, bool) {
}
// gpt-5 匹配
if
strings
.
HasPrefix
(
name
,
"gpt-5"
)
{
if
strings
.
HasPrefix
(
name
,
"gpt-5.5"
)
{
return
6
,
true
}
if
strings
.
HasPrefix
(
name
,
"gpt-5.4"
)
{
if
strings
.
HasPrefix
(
name
,
"gpt-5.4-nano"
)
{
return
6.25
,
true
...
...
setting/ratio_setting/model_ratio_test.go
0 → 100644
View file @
df6d8628
package
ratio_setting
import
"testing"
func
TestGetCompletionRatioInfoGPT55UsesOfficialOutputMultiplier
(
t
*
testing
.
T
)
{
info
:=
GetCompletionRatioInfo
(
"gpt-5.5"
)
if
info
.
Ratio
!=
6
{
t
.
Fatalf
(
"gpt-5.5 completion ratio = %v, want 6"
,
info
.
Ratio
)
}
if
!
info
.
Locked
{
t
.
Fatal
(
"gpt-5.5 completion ratio should be locked to the official multiplier"
)
}
}
func
TestGetCompletionRatioGPT55DatedVariant
(
t
*
testing
.
T
)
{
got
:=
GetCompletionRatio
(
"gpt-5.5-2026-04-24"
)
if
got
!=
6
{
t
.
Fatalf
(
"gpt-5.5 dated variant completion ratio = %v, want 6"
,
got
)
}
}
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