-
Notifications
You must be signed in to change notification settings - Fork 11.6k
fix: correct gpt-5.6 completion ratio #6063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||||||||||||||||||
| package ratio_setting | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| import ( | ||||||||||||||||||||||||
| "testing" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| "github.com/stretchr/testify/assert" | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| func TestGetCompletionRatioGPT56UsesSpecialRatio(t *testing.T) { | ||||||||||||||||||||||||
| assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6-sol")) | ||||||||||||||||||||||||
| assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6-terra")) | ||||||||||||||||||||||||
| assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6-luna")) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
Comment on lines
+9
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Correct the expected ratios for the $40/M variants. Given the stated $5/M input and $40/M output pricing, Proposed test correction func TestGetCompletionRatioGPT56UsesSpecialRatio(t *testing.T) {
- assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6-sol"))
- assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6-terra"))
- assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6-luna"))
+ assert.Equal(t, 6.0, GetCompletionRatio("gpt-5.6"))
+ assert.Equal(t, 8.0, GetCompletionRatio("gpt-5.6-sol"))
+ assert.Equal(t, 8.0, GetCompletionRatio("gpt-5.6-terra"))
+ assert.Equal(t, 8.0, GetCompletionRatio("gpt-5.6-luna"))
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Handle the $40/M GPT-5.6 variants separately.
This prefix matches
gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-luna, but the stated pricing contract is $5/M input and $40/M output for those models, requiring a completion ratio of8, not6. Keep6for the $30/M-output GPT-5.6 models and add a more-specific branch for the $40/M variants; this value flows into relay pricing and quota calculations.Proposed fix
if strings.HasPrefix(name, "gpt-5.6") { + if strings.HasPrefix(name, "gpt-5.6-sol") || + strings.HasPrefix(name, "gpt-5.6-terra") || + strings.HasPrefix(name, "gpt-5.6-luna") { + return 8, true + } return 6, true }📝 Committable suggestion
🤖 Prompt for AI Agents