MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_model_pricing_registry_completeness

Function test_model_pricing_registry_completeness

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

Source from the content-addressed store, hash-verified

566
567 #[test]
568 fn test_model_pricing_registry_completeness() {
569 let pricing = default_model_pricing();
570 // Verify all expected providers are covered
571 let anthropic_models: Vec<&str> = pricing
572 .keys()
573 .filter(|k| k.starts_with("claude"))
574 .map(|k| k.as_str())
575 .collect();
576 assert!(
577 anthropic_models.len() >= 3,
578 "Expected at least 3 Anthropic models, got {}",
579 anthropic_models.len()
580 );
581
582 let openai_models: Vec<&str> = pricing
583 .keys()
584 .filter(|k| k.starts_with("gpt"))
585 .map(|k| k.as_str())
586 .collect();
587 assert!(
588 openai_models.len() >= 2,
589 "Expected at least 2 OpenAI models, got {}",
590 openai_models.len()
591 );
592 }
593
594 #[test]
595 fn test_model_pricing_cost_ordering() {

Callers

nothing calls this directly

Calls 2

default_model_pricingFunction · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected