@@ -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+
2845func 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