@@ -81,6 +81,7 @@ impl ProviderId {
8181 pub const ADAL : ProviderId = ProviderId ( Cow :: Borrowed ( "adal" ) ) ;
8282 pub const XIAOMI_MIMO : ProviderId = ProviderId ( Cow :: Borrowed ( "xiaomi_mimo" ) ) ;
8383 pub const NVIDIA : ProviderId = ProviderId ( Cow :: Borrowed ( "nvidia" ) ) ;
84+ pub const AMBIENT : ProviderId = ProviderId ( Cow :: Borrowed ( "ambient" ) ) ;
8485
8586 /// Returns all built-in provider IDs
8687 ///
@@ -121,6 +122,7 @@ impl ProviderId {
121122 ProviderId :: ADAL ,
122123 ProviderId :: XIAOMI_MIMO ,
123124 ProviderId :: NVIDIA ,
125+ ProviderId :: AMBIENT ,
124126 ]
125127 }
126128
@@ -155,6 +157,7 @@ impl ProviderId {
155157 "adal" => "AdaL" . to_string ( ) ,
156158 "xiaomi_mimo" => "XiaomiMimo" . to_string ( ) ,
157159 "nvidia" => "NVIDIA" . to_string ( ) ,
160+ "ambient" => "Ambient" . to_string ( ) ,
158161 _ => {
159162 // For other providers, use UpperCamelCase conversion
160163 use convert_case:: { Case , Casing } ;
@@ -210,6 +213,7 @@ impl std::str::FromStr for ProviderId {
210213 "adal" => ProviderId :: ADAL ,
211214 "xiaomi_mimo" => ProviderId :: XIAOMI_MIMO ,
212215 "nvidia" => ProviderId :: NVIDIA ,
216+ "ambient" => ProviderId :: AMBIENT ,
213217 // For custom providers, use Cow::Owned to avoid memory leaks
214218 custom => ProviderId ( Cow :: Owned ( custom. to_string ( ) ) ) ,
215219 } ;
@@ -586,6 +590,7 @@ mod tests {
586590 assert_eq ! ( ProviderId :: OPENCODE_GO . to_string( ) , "OpenCode Go" ) ;
587591 assert_eq ! ( ProviderId :: GOOGLE_AI_STUDIO . to_string( ) , "GoogleAIStudio" ) ;
588592 assert_eq ! ( ProviderId :: NVIDIA . to_string( ) , "NVIDIA" ) ;
593+ assert_eq ! ( ProviderId :: AMBIENT . to_string( ) , "Ambient" ) ;
589594 }
590595
591596 #[ test]
@@ -626,6 +631,7 @@ mod tests {
626631 assert ! ( built_in. contains( & ProviderId :: OPENCODE_GO ) ) ;
627632 assert ! ( built_in. contains( & ProviderId :: GOOGLE_AI_STUDIO ) ) ;
628633 assert ! ( built_in. contains( & ProviderId :: NVIDIA ) ) ;
634+ assert ! ( built_in. contains( & ProviderId :: AMBIENT ) ) ;
629635 }
630636
631637 #[ test]
@@ -689,6 +695,24 @@ mod tests {
689695 assert ! ( built_in. contains( & ProviderId :: XIAOMI_MIMO ) ) ;
690696 }
691697
698+ #[ test]
699+ fn test_ambient_from_str ( ) {
700+ let actual = ProviderId :: from_str ( "ambient" ) . unwrap ( ) ;
701+ let expected = ProviderId :: AMBIENT ;
702+ assert_eq ! ( actual, expected) ;
703+ }
704+
705+ #[ test]
706+ fn test_ambient_display_name ( ) {
707+ assert_eq ! ( ProviderId :: AMBIENT . to_string( ) , "Ambient" ) ;
708+ }
709+
710+ #[ test]
711+ fn test_ambient_in_built_in_providers ( ) {
712+ let built_in = ProviderId :: built_in_providers ( ) ;
713+ assert ! ( built_in. contains( & ProviderId :: AMBIENT ) ) ;
714+ }
715+
692716 #[ test]
693717 fn test_io_intelligence ( ) {
694718 let fixture = "test_key" ;
0 commit comments