@@ -21,7 +21,7 @@ pub struct CodexToolCallParam {
2121 /// The *initial user prompt* to start the Codex conversation.
2222 pub prompt : String ,
2323
24- /// Optional override for the model name (e.g. "o3", "o4-mini" ).
24+ /// Optional override for the model name (e.g. 'gpt-5.2', 'gpt-5.2-codex' ).
2525 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
2626 pub model : Option < String > ,
2727
@@ -245,11 +245,8 @@ mod tests {
245245 let tool = create_tool_for_codex_tool_call_param ( ) ;
246246 let tool_json = serde_json:: to_value ( & tool) . expect ( "tool serializes" ) ;
247247 let expected_tool_json = serde_json:: json!( {
248- "name" : "codex" ,
249- "title" : "Codex" ,
250248 "description" : "Run a Codex session. Accepts configuration parameters matching the Codex Config struct." ,
251249 "inputSchema" : {
252- "type" : "object" ,
253250 "properties" : {
254251 "approval-policy" : {
255252 "description" : "Approval policy for shell commands generated by the model: `untrusted`, `on-failure`, `on-request`, `never`." ,
@@ -261,26 +258,29 @@ mod tests {
261258 ] ,
262259 "type" : "string"
263260 } ,
264- "sandbox" : {
265- "description" : "Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`." ,
266- "enum" : [
267- "read-only" ,
268- "workspace-write" ,
269- "danger-full-access"
270- ] ,
261+ "base-instructions" : {
262+ "description" : "The set of instructions to use instead of the default ones." ,
263+ "type" : "string"
264+ } ,
265+ "compact-prompt" : {
266+ "description" : "Prompt used when compacting the conversation." ,
271267 "type" : "string"
272268 } ,
273269 "config" : {
274- "description" : "Individual config settings that will override what is in CODEX_HOME/config.toml." ,
275270 "additionalProperties" : true ,
271+ "description" : "Individual config settings that will override what is in CODEX_HOME/config.toml." ,
276272 "type" : "object"
277273 } ,
278274 "cwd" : {
279275 "description" : "Working directory for the session. If relative, it is resolved against the server process's current working directory." ,
280276 "type" : "string"
281277 } ,
278+ "developer-instructions" : {
279+ "description" : "Developer instructions that should be injected as a developer role message." ,
280+ "type" : "string"
281+ } ,
282282 "model" : {
283- "description" : "Optional override for the model name (e.g. \" o3 \" , \" o4-mini \" )." ,
283+ "description" : "Optional override for the model name (e.g. 'gpt-5.2', 'gpt-5.2-codex' )." ,
284284 "type" : "string"
285285 } ,
286286 "profile" : {
@@ -291,23 +291,23 @@ mod tests {
291291 "description" : "The *initial user prompt* to start the Codex conversation." ,
292292 "type" : "string"
293293 } ,
294- "base-instructions" : {
295- "description" : "The set of instructions to use instead of the default ones." ,
296- "type" : "string"
297- } ,
298- "developer-instructions" : {
299- "description" : "Developer instructions that should be injected as a developer role message." ,
300- "type" : "string"
301- } ,
302- "compact-prompt" : {
303- "description" : "Prompt used when compacting the conversation." ,
294+ "sandbox" : {
295+ "description" : "Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`." ,
296+ "enum" : [
297+ "read-only" ,
298+ "workspace-write" ,
299+ "danger-full-access"
300+ ] ,
304301 "type" : "string"
305- } ,
302+ }
306303 } ,
307304 "required" : [
308305 "prompt"
309- ]
310- }
306+ ] ,
307+ "type" : "object"
308+ } ,
309+ "name" : "codex" ,
310+ "title" : "Codex"
311311 } ) ;
312312 assert_eq ! ( expected_tool_json, tool_json) ;
313313 }
0 commit comments