@@ -1014,6 +1014,55 @@ async fn setup_claude(existing_config: Option<Config>) -> Result<()> {
10141014 config. claude . vertex_credentials_path = None ;
10151015 }
10161016
1017+ // Model selection
1018+ println ! ( ) ;
1019+ println ! ( "Claude Code supports multiple models." ) ;
1020+ println ! ( "Aliases always point to the latest version." ) ;
1021+ println ! ( ) ;
1022+
1023+ let model_choices = vec ! [
1024+ "default Recommended for your account type" ,
1025+ "sonnet Latest Sonnet (fast, daily coding)" ,
1026+ "opus Latest Opus (complex reasoning)" ,
1027+ "haiku Latest Haiku (fast, simple tasks)" ,
1028+ "opusplan Opus for planning, Sonnet for execution" ,
1029+ "Custom Enter a full model name" ,
1030+ ] ;
1031+
1032+ let current_model_idx = config
1033+ . claude
1034+ . model
1035+ . as_deref ( )
1036+ . map ( |m| match m {
1037+ "default" => 0 ,
1038+ "sonnet" => 1 ,
1039+ "opus" => 2 ,
1040+ "haiku" => 3 ,
1041+ "opusplan" => 4 ,
1042+ _ => 5 ,
1043+ } )
1044+ . unwrap_or ( 0 ) ;
1045+
1046+ let model_selection = Select :: with_theme ( & ColorfulTheme :: default ( ) )
1047+ . with_prompt ( "Which model would you like to use?" )
1048+ . items ( & model_choices)
1049+ . default ( current_model_idx)
1050+ . interact ( ) ?;
1051+
1052+ config. claude . model = match model_selection {
1053+ 0 => None ,
1054+ 1 => Some ( "sonnet" . to_string ( ) ) ,
1055+ 2 => Some ( "opus" . to_string ( ) ) ,
1056+ 3 => Some ( "haiku" . to_string ( ) ) ,
1057+ 4 => Some ( "opusplan" . to_string ( ) ) ,
1058+ _ => {
1059+ let custom: String = Input :: with_theme ( & ColorfulTheme :: default ( ) )
1060+ . with_prompt ( "Model name (e.g. claude-sonnet-4-5-20250929)" )
1061+ . interact_text ( ) ?;
1062+ Some ( custom. trim ( ) . to_string ( ) )
1063+ }
1064+ } ;
1065+
10171066 // Ask whether to switch if another backend was active
10181067 if was_using_cursor {
10191068 println ! ( ) ;
@@ -1037,9 +1086,13 @@ async fn setup_claude(existing_config: Option<Config>) -> Result<()> {
10371086 AiBackend :: Claude => "Claude Code" ,
10381087 AiBackend :: Cursor => "Cursor CLI" ,
10391088 } ;
1089+ let model_display = config. claude . model . as_deref ( ) . unwrap_or ( "default" ) ;
10401090
10411091 println ! ( ) ;
1042- println ! ( "Setup complete! Active backend: {}" , active) ;
1092+ println ! (
1093+ "Setup complete! Active backend: {} (model: {})" ,
1094+ active, model_display
1095+ ) ;
10431096 println ! ( ) ;
10441097 println ! ( "Config saved to: {}" , paths. config_file. display( ) ) ;
10451098 println ! ( ) ;
0 commit comments