@@ -74,6 +74,7 @@ impl ProviderId {
7474 pub const FIREWORKS_AI : ProviderId = ProviderId ( Cow :: Borrowed ( "fireworks-ai" ) ) ;
7575 pub const NOVITA : ProviderId = ProviderId ( Cow :: Borrowed ( "novita" ) ) ;
7676 pub const GOOGLE_AI_STUDIO : ProviderId = ProviderId ( Cow :: Borrowed ( "google_ai_studio" ) ) ;
77+ pub const MODAL : ProviderId = ProviderId ( Cow :: Borrowed ( "modal" ) ) ;
7778
7879 /// Returns all built-in provider IDs
7980 ///
@@ -108,6 +109,7 @@ impl ProviderId {
108109 ProviderId :: FIREWORKS_AI ,
109110 ProviderId :: NOVITA ,
110111 ProviderId :: GOOGLE_AI_STUDIO ,
112+ ProviderId :: MODAL ,
111113 ]
112114 }
113115
@@ -136,6 +138,7 @@ impl ProviderId {
136138 "fireworks-ai" => "FireworksAI" . to_string ( ) ,
137139 "novita" => "Novita" . to_string ( ) ,
138140 "google_ai_studio" => "GoogleAIStudio" . to_string ( ) ,
141+ "modal" => "Modal" . to_string ( ) ,
139142 _ => {
140143 // For other providers, use UpperCamelCase conversion
141144 use convert_case:: { Case , Casing } ;
@@ -182,6 +185,7 @@ impl std::str::FromStr for ProviderId {
182185 "fireworks-ai" => ProviderId :: FIREWORKS_AI ,
183186 "novita" => ProviderId :: NOVITA ,
184187 "google_ai_studio" => ProviderId :: GOOGLE_AI_STUDIO ,
188+ "modal" => ProviderId :: MODAL ,
185189 // For custom providers, use Cow::Owned to avoid memory leaks
186190 custom => ProviderId ( Cow :: Owned ( custom. to_string ( ) ) ) ,
187191 } ;
@@ -596,6 +600,24 @@ mod tests {
596600 assert_eq ! ( actual, expected) ;
597601 }
598602
603+ #[ test]
604+ fn test_modal_from_str ( ) {
605+ let actual = ProviderId :: from_str ( "modal" ) . unwrap ( ) ;
606+ let expected = ProviderId :: MODAL ;
607+ assert_eq ! ( actual, expected) ;
608+ }
609+
610+ #[ test]
611+ fn test_modal_display_name ( ) {
612+ assert_eq ! ( ProviderId :: MODAL . to_string( ) , "Modal" ) ;
613+ }
614+
615+ #[ test]
616+ fn test_modal_in_built_in_providers ( ) {
617+ let built_in = ProviderId :: built_in_providers ( ) ;
618+ assert ! ( built_in. contains( & ProviderId :: MODAL ) ) ;
619+ }
620+
599621 #[ test]
600622 fn test_io_intelligence ( ) {
601623 let fixture = "test_key" ;
0 commit comments