Skip to content

Commit e03815f

Browse files
authored
[model-inventory] Add missing MAI-Code model entry and correct Copilot cache-read pricing (#52191)
1 parent ad8c16d commit e03815f

3 files changed

Lines changed: 47 additions & 10 deletions

File tree

actions/setup/js/models.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
"cost": {
409409
"input": "2.5e-07",
410410
"output": "2e-06",
411-
"cache_read": "2.5000000000000002e-08"
411+
"cache_read": "2e-08"
412412
},
413413
"provider_type": "openai",
414414
"wire_api": "responses"
@@ -435,7 +435,7 @@
435435
"cost": {
436436
"input": "1.75e-06",
437437
"output": "1.4e-05",
438-
"cache_read": "1.75e-07"
438+
"cache_read": "1.7e-07"
439439
},
440440
"provider_type": "openai",
441441
"wire_api": "responses"
@@ -453,7 +453,7 @@
453453
"cost": {
454454
"input": "7.5e-07",
455455
"output": "4.5e-06",
456-
"cache_read": "7.5e-08"
456+
"cache_read": "7e-08"
457457
},
458458
"provider_type": "openai",
459459
"wire_api": "responses"
@@ -512,11 +512,21 @@
512512
"provider_type": "openai",
513513
"wire_api": "completions"
514514
},
515+
"mai-code-1.1-flash": {
516+
"cost": {
517+
"input": "2e-07",
518+
"output": "1.2e-06",
519+
"cache_read": "2e-08",
520+
"cache_write": "2.5e-07"
521+
},
522+
"provider_type": "openai",
523+
"wire_api": "responses"
524+
},
515525
"mai-code-1-flash-picker": {
516526
"cost": {
517527
"input": "7.5e-07",
518528
"output": "4.5e-06",
519-
"cache_read": "7.5e-08"
529+
"cache_read": "7e-08"
520530
},
521531
"provider_type": "openai",
522532
"wire_api": "responses"
@@ -543,7 +553,7 @@
543553
"cost": {
544554
"input": "2e-06",
545555
"output": "6e-06",
546-
"cache_read": "5e-08"
556+
"cache_read": "5e-07"
547557
},
548558
"provider_type": "openai",
549559
"wire_api": "completions"

pkg/cli/data/models.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
"cost": {
409409
"input": "2.5e-07",
410410
"output": "2e-06",
411-
"cache_read": "2.5000000000000002e-08"
411+
"cache_read": "2e-08"
412412
},
413413
"provider_type": "openai",
414414
"wire_api": "responses"
@@ -435,7 +435,7 @@
435435
"cost": {
436436
"input": "1.75e-06",
437437
"output": "1.4e-05",
438-
"cache_read": "1.75e-07"
438+
"cache_read": "1.7e-07"
439439
},
440440
"provider_type": "openai",
441441
"wire_api": "responses"
@@ -453,7 +453,7 @@
453453
"cost": {
454454
"input": "7.5e-07",
455455
"output": "4.5e-06",
456-
"cache_read": "7.5e-08"
456+
"cache_read": "7e-08"
457457
},
458458
"provider_type": "openai",
459459
"wire_api": "responses"
@@ -512,11 +512,21 @@
512512
"provider_type": "openai",
513513
"wire_api": "completions"
514514
},
515+
"mai-code-1.1-flash": {
516+
"cost": {
517+
"input": "2e-07",
518+
"output": "1.2e-06",
519+
"cache_read": "2e-08",
520+
"cache_write": "2.5e-07"
521+
},
522+
"provider_type": "openai",
523+
"wire_api": "responses"
524+
},
515525
"mai-code-1-flash-picker": {
516526
"cost": {
517527
"input": "7.5e-07",
518528
"output": "4.5e-06",
519-
"cache_read": "7.5e-08"
529+
"cache_read": "7e-08"
520530
},
521531
"provider_type": "openai",
522532
"wire_api": "responses"
@@ -543,7 +553,7 @@
543553
"cost": {
544554
"input": "2e-06",
545555
"output": "6e-06",
546-
"cache_read": "5e-08"
556+
"cache_read": "5e-07"
547557
},
548558
"provider_type": "openai",
549559
"wire_api": "completions"

pkg/cli/model_costs_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ func TestFindKimiK3Pricing(t *testing.T) {
2525
assert.InDelta(t, 0.0000003, pricing["cache_read"], 1e-12)
2626
}
2727

28+
func TestFindMaiCode11FlashPricing(t *testing.T) {
29+
pricing, ok := findModelPricing("github-copilot", "mai-code-1.1-flash")
30+
require.True(t, ok)
31+
assert.InDelta(t, 0.0000002, pricing["input"], 1e-12)
32+
assert.InDelta(t, 0.0000012, pricing["output"], 1e-12)
33+
assert.InDelta(t, 0.00000002, pricing["cache_read"], 1e-12)
34+
assert.InDelta(t, 0.00000025, pricing["cache_write"], 1e-12)
35+
}
36+
37+
func TestFindGrok45CacheReadPricing(t *testing.T) {
38+
pricing, ok := findModelPricing("github-copilot", "grok-4.5")
39+
require.True(t, ok)
40+
assert.InDelta(t, 0.000002, pricing["input"], 1e-12)
41+
assert.InDelta(t, 0.000006, pricing["output"], 1e-12)
42+
assert.InDelta(t, 0.0000005, pricing["cache_read"], 1e-12)
43+
}
44+
2845
func TestComputeModelInferenceAIC(t *testing.T) {
2946
aic := computeModelInferenceAIC("anthropic", "claude-sonnet-4.6", 1000, 200, 400, 50, 25)
3047
assert.InDelta(t, 0.54825, aic, 1e-9)

0 commit comments

Comments
 (0)