Commit 05b0041d by Calcium-Ion Committed by GitHub

Merge pull request #4414 from jingx8885/codex/fix-gpt-55-completion-ratio

fix: correct gpt-5.5 completion ratio
parents ec8f3dce df6d8628
...@@ -515,6 +515,9 @@ func getHardcodedCompletionModelRatio(name string) (float64, bool) { ...@@ -515,6 +515,9 @@ func getHardcodedCompletionModelRatio(name string) (float64, bool) {
} }
// gpt-5 匹配 // gpt-5 匹配
if strings.HasPrefix(name, "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") {
if strings.HasPrefix(name, "gpt-5.4-nano") { if strings.HasPrefix(name, "gpt-5.4-nano") {
return 6.25, true return 6.25, true
......
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)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment