feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -19,16 +19,16 @@ func TestGroupModelPricingPreservesOtherGroupsAndSnapshot(t *testing.T) {
|
||||
require.NoError(t, config.GlobalConfig.LoadFromDB(map[string]string{
|
||||
"billing_setting.billing_mode": `{"gpt-5.6-sol":"tiered_expr"}`,
|
||||
"billing_setting.billing_expr": `{"gpt-5.6-sol":"tier(\"standard\", p * 4 + c * 20 + cr * 0.4)"}`,
|
||||
"billing_setting.group_billing_expr": `{"example-premium":{"gpt-5.6-sol":"tier(\"standard\", p * 5 + c * 30 + cr * 0.5)"}}`,
|
||||
"group_ratio_setting.group_ratio": `{"example-premium":0.25,"example-standard":0.5}`,
|
||||
"billing_setting.group_billing_expr": `{"gpt-v-pro":{"gpt-5.6-sol":"tier(\"standard\", p * 5 + c * 30 + cr * 0.5)"}}`,
|
||||
"group_ratio_setting.group_ratio": `{"gpt-v-pro":0.2052,"gpt-v-mix":0.18}`,
|
||||
}))
|
||||
for _, tc := range []struct {
|
||||
group string
|
||||
expected int
|
||||
cost float64
|
||||
}{
|
||||
{"example-premium", 1000, 8500},
|
||||
{"example-standard", 1500, 6400},
|
||||
{"gpt-v-pro", 513, 8500},
|
||||
{"gpt-v-mix", 360, 6400},
|
||||
} {
|
||||
t.Run(tc.group, func(t *testing.T) {
|
||||
ctx, _ := gin.CreateTestContext(httptest.NewRecorder())
|
||||
|
||||
Reference in new issue
Block a user