@@ -225,6 +225,8 @@ impl ModelCapabilitiesManager {
225225 match model_type {
226226 "gpt-5" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
227227 "gpt-5.1" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
228+ "gpt-5.2" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
229+ "gpt-5.2-pro" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
228230 "gpt-5-mini" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
229231 "gpt-5-nano" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
230232 "gpt-5-chat-latest" => vec ! [ ModelCapability :: ImageAnalysis , ModelCapability :: TextInference ] ,
@@ -256,6 +258,14 @@ impl ModelCapabilitiesManager {
256258 fn get_gemini_capabilities ( model_type : & str ) -> Vec < ModelCapability > {
257259 match model_type {
258260 // Gemini 3 models
261+ model_type if model_type. starts_with ( "gemini-3-flash" ) => {
262+ vec ! [
263+ ModelCapability :: TextInference ,
264+ ModelCapability :: ImageAnalysis ,
265+ ModelCapability :: VideoAnalysis ,
266+ ModelCapability :: AudioAnalysis ,
267+ ]
268+ }
259269 model_type if model_type. starts_with ( "gemini-3-pro" ) => {
260270 vec ! [
261271 ModelCapability :: TextInference ,
@@ -374,6 +384,8 @@ impl ModelCapabilitiesManager {
374384 match model_type {
375385 "gpt-5" => ModelCost :: GoodValue ,
376386 "gpt-5.1" => ModelCost :: GoodValue ,
387+ "gpt-5.2" => ModelCost :: GoodValue ,
388+ "gpt-5.2-pro" => ModelCost :: Expensive ,
377389 "gpt-5-mini" => ModelCost :: Cheap ,
378390 "gpt-5-nano" => ModelCost :: VeryCheap ,
379391 "gpt-5-chat-latest" => ModelCost :: GoodValue ,
@@ -397,6 +409,7 @@ impl ModelCapabilitiesManager {
397409 fn get_gemini_cost ( model_type : & str ) -> ModelCost {
398410 match model_type {
399411 // Gemini 3 models
412+ model_type if model_type. starts_with ( "gemini-3-flash" ) => ModelCost :: Cheap ,
400413 model_type if model_type. starts_with ( "gemini-3-pro" ) => ModelCost :: Expensive ,
401414 // Gemini 2.5 models (preview/experimental - more expensive due to restricted limits)
402415 model_type if model_type. starts_with ( "gemini-2.5-flash-preview" ) => ModelCost :: GoodValue ,
@@ -419,6 +432,7 @@ impl ModelCapabilitiesManager {
419432 fn get_gemini_max_tokens ( model_type : & str ) -> usize {
420433 match model_type {
421434 // Gemini 3 models
435+ model_type if model_type. starts_with ( "gemini-3-flash" ) => 1_048_576 ,
422436 model_type if model_type. starts_with ( "gemini-3-pro" ) => 1_048_576 ,
423437 // Gemini 2.5 models
424438 model_type if model_type. starts_with ( "gemini-2.5-flash-preview-05-20" ) => 1_048_576 ,
@@ -445,6 +459,7 @@ impl ModelCapabilitiesManager {
445459 fn get_gemini_max_output_tokens ( model_type : & str ) -> usize {
446460 match model_type {
447461 // Gemini 3 models
462+ model_type if model_type. starts_with ( "gemini-3-flash" ) => 65_536 ,
448463 model_type if model_type. starts_with ( "gemini-3-pro" ) => 65_536 ,
449464 // Gemini 2.5 models
450465 model_type if model_type. starts_with ( "gemini-2.5-flash-preview-05-20" ) => 65_536 ,
@@ -471,6 +486,7 @@ impl ModelCapabilitiesManager {
471486 fn gemini_has_tool_capabilities ( model_type : & str ) -> bool {
472487 match model_type {
473488 // Gemini 3 models
489+ model_type if model_type. starts_with ( "gemini-3-flash" ) => true ,
474490 model_type if model_type. starts_with ( "gemini-3-pro" ) => true ,
475491 // Gemini 2.5 models - TTS models don't support function calling
476492 model_type if model_type. starts_with ( "gemini-2.5-flash-preview-tts" ) => false ,
@@ -517,7 +533,9 @@ impl ModelCapabilitiesManager {
517533 LLMProviderInterface :: Exo ( _) => ModelCost :: Cheap ,
518534 LLMProviderInterface :: OpenRouter ( _) => ModelCost :: Free ,
519535 LLMProviderInterface :: Grok ( grok) => {
520- if grok. model_type . starts_with ( "grok-4" ) {
536+ if grok. model_type . starts_with ( "grok-4.1-fast" ) {
537+ ModelCost :: GoodValue
538+ } else if grok. model_type . starts_with ( "grok-4" ) {
521539 ModelCost :: GoodValue
522540 } else if grok. model_type . starts_with ( "grok-3-mini" ) {
523541 ModelCost :: VeryCheap
@@ -532,11 +550,14 @@ impl ModelCapabilitiesManager {
532550 }
533551 }
534552 LLMProviderInterface :: Claude ( claude) => match claude. model_type . as_str ( ) {
553+ "claude-opus-4.5" | "claude-opus-4-5" => ModelCost :: Expensive ,
535554 "claude-opus-4-1-20250805" | "claude-opus-4-1" => ModelCost :: Expensive ,
536555 "claude-opus-4-20250514" | "claude-opus-4-0" => ModelCost :: Expensive ,
556+ "claude-sonnet-4.5" | "claude-sonnet-4-5" => ModelCost :: Cheap ,
537557 "claude-sonnet-4-20250514" | "claude-sonnet-4-0" => ModelCost :: Cheap ,
538558 "claude-3-7-sonnet-20250219" | "claude-3-7-sonnet-latest" => ModelCost :: Cheap ,
539559 "claude-3-5-sonnet-20241022" | "claude-3-5-sonnet-latest" => ModelCost :: Cheap ,
560+ "claude-haiku-4.5" | "claude-haiku-4-5" => ModelCost :: VeryCheap ,
540561 "claude-3-5-haiku-20241022" | "claude-3-5-haiku-latest" => ModelCost :: VeryCheap ,
541562 "claude-3-opus-20240229" | "claude-3-opus-latest" => ModelCost :: Expensive ,
542563 "claude-3-haiku-20240307" => ModelCost :: VeryCheap ,
@@ -758,7 +779,9 @@ impl ModelCapabilitiesManager {
758779 LLMProviderInterface :: Exo ( exo) => Self :: get_max_tokens_for_model_type ( & exo. model_type ) ,
759780 LLMProviderInterface :: Groq ( groq) => Self :: get_max_tokens_for_model_type ( & groq. model_type ) ,
760781 LLMProviderInterface :: Grok ( grok) => {
761- if grok. model_type . starts_with ( "grok-4" ) {
782+ if grok. model_type . starts_with ( "grok-4.1-fast" ) {
783+ 256_000
784+ } else if grok. model_type . starts_with ( "grok-4" ) {
762785 256_000
763786 } else if grok. model_type . starts_with ( "grok-3" ) {
764787 131_072
@@ -966,7 +989,9 @@ impl ModelCapabilitiesManager {
966989 }
967990 }
968991 LLMProviderInterface :: Grok ( grok) => {
969- if grok. model_type . starts_with ( "grok-4" ) {
992+ if grok. model_type . starts_with ( "grok-4.1-fast" ) {
993+ 128_000
994+ } else if grok. model_type . starts_with ( "grok-4" ) {
970995 128_000
971996 } else if grok. model_type . starts_with ( "grok-3" ) {
972997 65_536
@@ -984,10 +1009,16 @@ impl ModelCapabilitiesManager {
9841009 max_tokens. unwrap_or ( model. and_then ( |m| m. context_length ) . unwrap_or ( 4096 ) ) as usize
9851010 }
9861011 LLMProviderInterface :: Claude ( claude) => {
987- if claude. model_type . starts_with ( "claude-opus-4" ) {
1012+ if claude. model_type . starts_with ( "claude-opus-4.5" ) || claude. model_type . starts_with ( "claude-opus-4-5" ) {
1013+ 32_000
1014+ } else if claude. model_type . starts_with ( "claude-opus-4" ) {
9881015 32_000
1016+ } else if claude. model_type . starts_with ( "claude-sonnet-4.5" ) || claude. model_type . starts_with ( "claude-sonnet-4-5" ) {
1017+ 64_000
9891018 } else if claude. model_type . starts_with ( "claude-sonnet-4" ) {
9901019 64_000
1020+ } else if claude. model_type . starts_with ( "claude-haiku-4.5" ) || claude. model_type . starts_with ( "claude-haiku-4-5" ) {
1021+ 8192
9911022 } else if claude. model_type . starts_with ( "claude-3-7-sonnet" ) {
9921023 64_000
9931024 } else if claude. model_type . starts_with ( "claude-3-5-sonnet" ) {
@@ -1161,7 +1192,7 @@ impl ModelCapabilitiesManager {
11611192 || model. model_type . starts_with ( "qwen-2.5-coder-32b" )
11621193 || model. model_type . starts_with ( "qwen-2.5-32b" )
11631194 || model. model_type . starts_with ( "deepseek-r1-distill-qwen-32b" )
1164- || model. model_type . starts_with ( "deepseek-r1-distill-llama-70b" )
1195+ || model. model_type . starts_with ( "deepseek-r1-distill-llama-70b" )
11651196 // List from https://console.groq.com/docs/tool-use (sept 11, 2025)
11661197 || model. model_type . starts_with ( "openai/gpt-oss" )
11671198 || model. model_type . starts_with ( "qwen/qwen3-32b" )
@@ -1219,8 +1250,12 @@ impl ModelCapabilitiesManager {
12191250 }
12201251 LLMProviderInterface :: DeepSeek ( deepseek) => deepseek. model_type . starts_with ( "deepseek-reasoner" ) ,
12211252 LLMProviderInterface :: Claude ( claude) => {
1222- claude. model_type . starts_with ( "claude-opus-4-1" )
1253+ claude. model_type . starts_with ( "claude-opus-4.5" )
1254+ || claude. model_type . starts_with ( "claude-opus-4-5" )
1255+ || claude. model_type . starts_with ( "claude-opus-4-1" )
12231256 || claude. model_type . starts_with ( "claude-opus-4" )
1257+ || claude. model_type . starts_with ( "claude-sonnet-4.5" )
1258+ || claude. model_type . starts_with ( "claude-sonnet-4-5" )
12241259 || claude. model_type . starts_with ( "claude-sonnet-4" )
12251260 || claude. model_type . starts_with ( "claude-3-7-sonnet" )
12261261 }
@@ -1231,6 +1266,7 @@ impl ModelCapabilitiesManager {
12311266 || gemini. model_type == "gemini-2.5-flash"
12321267 || gemini. model_type == "gemini-2.5-pro"
12331268 || gemini. model_type == "gemini-2.0-flash-exp"
1269+ || gemini. model_type . starts_with ( "gemini-3-flash" )
12341270 || gemini. model_type . starts_with ( "gemini-3-pro" )
12351271 }
12361272 LLMProviderInterface :: ShinkaiBackend ( shinkai_backend) => {
0 commit comments