@@ -66,41 +66,27 @@ macro_rules! model_family {
66
66
} } ;
67
67
}
68
68
69
- macro_rules! simple_model_family {
70
- (
71
- $slug: expr, $family: expr
72
- ) => { {
73
- Some ( ModelFamily {
74
- slug: $slug. to_string( ) ,
75
- family: $family. to_string( ) ,
76
- needs_special_apply_patch_instructions: false ,
77
- supports_reasoning_summaries: false ,
78
- reasoning_summary_format: ReasoningSummaryFormat :: None ,
79
- uses_local_shell_tool: false ,
80
- apply_patch_tool_type: None ,
81
- base_instructions: BASE_INSTRUCTIONS . to_string( ) ,
82
- } )
83
- } } ;
84
- }
85
-
86
69
/// Returns a `ModelFamily` for the given model slug, or `None` if the slug
87
70
/// does not match any known model family.
88
71
pub fn find_family_for_model ( slug : & str ) -> Option < ModelFamily > {
89
72
if slug. starts_with ( "o3" ) {
90
73
model_family ! (
91
74
slug, "o3" ,
92
75
supports_reasoning_summaries: true ,
76
+ needs_special_apply_patch_instructions: true ,
93
77
)
94
78
} else if slug. starts_with ( "o4-mini" ) {
95
79
model_family ! (
96
80
slug, "o4-mini" ,
97
81
supports_reasoning_summaries: true ,
82
+ needs_special_apply_patch_instructions: true ,
98
83
)
99
84
} else if slug. starts_with ( "codex-mini-latest" ) {
100
85
model_family ! (
101
86
slug, "codex-mini-latest" ,
102
87
supports_reasoning_summaries: true ,
103
88
uses_local_shell_tool: true ,
89
+ needs_special_apply_patch_instructions: true ,
104
90
)
105
91
} else if slug. starts_with ( "gpt-4.1" ) {
106
92
model_family ! (
@@ -110,26 +96,21 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
110
96
} else if slug. starts_with ( "gpt-oss" ) || slug. starts_with ( "openai/gpt-oss" ) {
111
97
model_family ! ( slug, "gpt-oss" , apply_patch_tool_type: Some ( ApplyPatchToolType :: Function ) )
112
98
} else if slug. starts_with ( "gpt-4o" ) {
113
- simple_model_family ! ( slug, "gpt-4o" )
99
+ model_family ! ( slug, "gpt-4o" , needs_special_apply_patch_instructions : true )
114
100
} else if slug. starts_with ( "gpt-3.5" ) {
115
- simple_model_family ! ( slug, "gpt-3.5" )
116
- } else if slug. starts_with ( "codex-" ) {
101
+ model_family ! ( slug, "gpt-3.5" , needs_special_apply_patch_instructions : true )
102
+ } else if slug. starts_with ( "codex-" ) || slug . starts_with ( "swiftfox" ) {
117
103
model_family ! (
118
104
slug, slug,
119
105
supports_reasoning_summaries: true ,
120
106
reasoning_summary_format: ReasoningSummaryFormat :: Experimental ,
107
+ base_instructions: SWIFTFOX_INSTRUCTIONS . to_string( ) ,
121
108
)
122
109
} else if slug. starts_with ( "gpt-5" ) {
123
110
model_family ! (
124
111
slug, "gpt-5" ,
125
112
supports_reasoning_summaries: true ,
126
- )
127
- } else if slug. starts_with ( "swiftfox" ) {
128
- model_family ! (
129
- slug, "swiftfox" ,
130
- supports_reasoning_summaries: true ,
131
- reasoning_summary_format: ReasoningSummaryFormat :: Experimental ,
132
- base_instructions: SWIFTFOX_INSTRUCTIONS . to_string( ) ,
113
+ needs_special_apply_patch_instructions: true ,
133
114
)
134
115
} else {
135
116
None
0 commit comments