@@ -33,7 +33,7 @@ macro_rules! model_info {
3333 // This is primarily used when remote metadata is available. When running
3434 // offline, core generally omits the effort field unless explicitly
3535 // configured by the user.
36- default_reasoning_level: ReasoningEffort :: Medium ,
36+ default_reasoning_level: Some ( ReasoningEffort :: Medium ) ,
3737 supported_reasoning_levels: supported_reasoning_level_low_medium_high( ) ,
3838 shell_type: ConfigShellToolType :: Default ,
3939 visibility: ModelVisibility :: None ,
@@ -169,6 +169,7 @@ pub(crate) fn find_model_info_for_slug(slug: &str) -> ModelInfo {
169169 support_verbosity: true ,
170170 default_verbosity: Some ( Verbosity :: Low ) ,
171171 base_instructions: BASE_INSTRUCTIONS . to_string( ) ,
172+ default_reasoning_level: Some ( ReasoningEffort :: Medium ) ,
172173 truncation_policy: TruncationPolicyConfig :: bytes( 10_000 ) ,
173174 shell_type: ConfigShellToolType :: UnifiedExec ,
174175 supports_parallel_tool_calls: true ,
@@ -247,6 +248,7 @@ pub(crate) fn find_model_info_for_slug(slug: &str) -> ModelInfo {
247248 supports_parallel_tool_calls: true ,
248249 context_window: CONTEXT_WINDOW_272K ,
249250 supported_reasoning_levels: supported_reasoning_level_low_medium_high_xhigh_non_codex( ) ,
251+ default_reasoning_level: Some ( ReasoningEffort :: Medium ) ,
250252 )
251253 } else if slug. starts_with ( "gpt-5.1" ) && !slug. contains ( "codex" ) {
252254 model_info ! (
@@ -260,6 +262,7 @@ pub(crate) fn find_model_info_for_slug(slug: &str) -> ModelInfo {
260262 shell_type: ConfigShellToolType :: ShellCommand ,
261263 supports_parallel_tool_calls: true ,
262264 context_window: CONTEXT_WINDOW_272K ,
265+ default_reasoning_level: Some ( ReasoningEffort :: Medium ) ,
263266 supported_reasoning_levels: supported_reasoning_level_low_medium_high_non_codex( ) ,
264267 )
265268 } else if slug. starts_with ( "gpt-5" ) {
@@ -273,7 +276,31 @@ pub(crate) fn find_model_info_for_slug(slug: &str) -> ModelInfo {
273276 context_window: CONTEXT_WINDOW_272K ,
274277 )
275278 } else {
276- model_info ! ( slug)
279+ // Unknown model: return defaults with context_window=0 (sentinel for "unknown")
280+ // and empty base_instructions. This matches the old ModelFamily behavior.
281+ ModelInfo {
282+ slug : slug. to_string ( ) ,
283+ display_name : slug. to_string ( ) ,
284+ description : None ,
285+ default_reasoning_level : Some ( ReasoningEffort :: Medium ) ,
286+ supported_reasoning_levels : Vec :: new ( ) ,
287+ shell_type : ConfigShellToolType :: Default ,
288+ visibility : ModelVisibility :: None ,
289+ supported_in_api : true ,
290+ priority : 99 ,
291+ upgrade : None ,
292+ base_instructions : String :: new ( ) ,
293+ supports_reasoning_summaries : false ,
294+ support_verbosity : false ,
295+ default_verbosity : None ,
296+ apply_patch_tool_type : None ,
297+ truncation_policy : TruncationPolicyConfig :: bytes ( 10_000 ) ,
298+ supports_parallel_tool_calls : false ,
299+ context_window : 0 ,
300+ auto_compact_token_limit : None ,
301+ effective_context_window_percent : 95 ,
302+ experimental_supported_tools : Vec :: new ( ) ,
303+ }
277304 }
278305}
279306
0 commit comments