MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_model_pricing_cost_ordering

Function test_model_pricing_cost_ordering

core/src/telemetry.rs:595–612  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

593
594 #[test]
595 fn test_model_pricing_cost_ordering() {
596 let pricing = default_model_pricing();
597 // Haiku should be cheaper than Sonnet
598 let haiku = pricing.get("claude-3-haiku-20240307").unwrap();
599 let sonnet = pricing.get("claude-sonnet-4-20250514").unwrap();
600 assert!(
601 haiku.input_per_million < sonnet.input_per_million,
602 "Haiku should be cheaper than Sonnet"
603 );
604
605 // GPT-4o-mini should be cheaper than GPT-4o
606 let mini = pricing.get("gpt-4o-mini").unwrap();
607 let full = pricing.get("gpt-4o").unwrap();
608 assert!(
609 mini.input_per_million < full.input_per_million,
610 "GPT-4o-mini should be cheaper than GPT-4o"
611 );
612 }
613
614 #[test]
615 fn test_llm_cost_record_fields() {

Callers

nothing calls this directly

Calls 2

default_model_pricingFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected