@@ -84,6 +84,7 @@ impl ProviderId {
8484 pub const AMBIENT : ProviderId = ProviderId ( Cow :: Borrowed ( "ambient" ) ) ;
8585 pub const NEURALWATT : ProviderId = ProviderId ( Cow :: Borrowed ( "neuralwatt" ) ) ;
8686 pub const ORCA_ROUTER : ProviderId = ProviderId ( Cow :: Borrowed ( "orca_router" ) ) ;
87+ pub const META : ProviderId = ProviderId ( Cow :: Borrowed ( "meta" ) ) ;
8788
8889 /// Returns all built-in provider IDs
8990 ///
@@ -127,6 +128,7 @@ impl ProviderId {
127128 ProviderId :: AMBIENT ,
128129 ProviderId :: NEURALWATT ,
129130 ProviderId :: ORCA_ROUTER ,
131+ ProviderId :: META ,
130132 ]
131133 }
132134
@@ -164,6 +166,7 @@ impl ProviderId {
164166 "ambient" => "Ambient" . to_string ( ) ,
165167 "neuralwatt" => "Neuralwatt" . to_string ( ) ,
166168 "orca_router" => "OrcaRouter" . to_string ( ) ,
169+ "meta" => "Meta" . to_string ( ) ,
167170 _ => {
168171 // For other providers, use UpperCamelCase conversion
169172 use convert_case:: { Case , Casing } ;
@@ -222,6 +225,7 @@ impl std::str::FromStr for ProviderId {
222225 "ambient" => ProviderId :: AMBIENT ,
223226 "neuralwatt" => ProviderId :: NEURALWATT ,
224227 "orca_router" => ProviderId :: ORCA_ROUTER ,
228+ "meta" => ProviderId :: META ,
225229 // For custom providers, use Cow::Owned to avoid memory leaks
226230 custom => ProviderId ( Cow :: Owned ( custom. to_string ( ) ) ) ,
227231 } ;
@@ -600,6 +604,7 @@ mod tests {
600604 assert_eq ! ( ProviderId :: NVIDIA . to_string( ) , "NVIDIA" ) ;
601605 assert_eq ! ( ProviderId :: AMBIENT . to_string( ) , "Ambient" ) ;
602606 assert_eq ! ( ProviderId :: ORCA_ROUTER . to_string( ) , "OrcaRouter" ) ;
607+ assert_eq ! ( ProviderId :: META . to_string( ) , "Meta" ) ;
603608 }
604609
605610 #[ test]
@@ -642,6 +647,7 @@ mod tests {
642647 assert ! ( built_in. contains( & ProviderId :: NVIDIA ) ) ;
643648 assert ! ( built_in. contains( & ProviderId :: AMBIENT ) ) ;
644649 assert ! ( built_in. contains( & ProviderId :: ORCA_ROUTER ) ) ;
650+ assert ! ( built_in. contains( & ProviderId :: META ) ) ;
645651 }
646652
647653 #[ test]
@@ -759,6 +765,24 @@ mod tests {
759765 assert ! ( built_in. contains( & ProviderId :: ORCA_ROUTER ) ) ;
760766 }
761767
768+ #[ test]
769+ fn test_meta_from_str ( ) {
770+ let actual = ProviderId :: from_str ( "meta" ) . unwrap ( ) ;
771+ let expected = ProviderId :: META ;
772+ assert_eq ! ( actual, expected) ;
773+ }
774+
775+ #[ test]
776+ fn test_meta_display_name ( ) {
777+ assert_eq ! ( ProviderId :: META . to_string( ) , "Meta" ) ;
778+ }
779+
780+ #[ test]
781+ fn test_meta_in_built_in_providers ( ) {
782+ let built_in = ProviderId :: built_in_providers ( ) ;
783+ assert ! ( built_in. contains( & ProviderId :: META ) ) ;
784+ }
785+
762786 #[ test]
763787 fn test_io_intelligence ( ) {
764788 let fixture = "test_key" ;
0 commit comments