Lightweight coding agent that runs in your terminal
Rust
fix: update model examples to gpt-5.2 (#8566)
Abdelkader Boudih06e21c7a6505
diff --git a/codex-rs/mcp-server/src/codex_tool_config.rs b/codex-rs/mcp-server/src/codex_tool_config.rsindex 16d38da45e..26fdc07320 100644--- a/codex-rs/mcp-server/src/codex_tool_config.rs+++ b/codex-rs/mcp-server/src/codex_tool_config.rs@@ -21,7 +21,7 @@ pub struct CodexToolCallParam {/// The *initial user prompt* to start the Codex conversation.pub prompt: String,- /// Optional override for the model name (e.g. "o3", "o4-mini").+ /// Optional override for the model name (e.g. 'gpt-5.2', 'gpt-5.2-codex').#[serde(default, skip_serializing_if = "Option::is_none")]pub model: Option<String>,@@ -245,11 +245,8 @@ mod tests {let tool = create_tool_for_codex_tool_call_param();let tool_json = serde_json::to_value(&tool).expect("tool serializes");let expected_tool_json = serde_json::json!({- "name": "codex",- "title": "Codex","description": "Run a Codex session. Accepts configuration parameters matching the Codex Config struct.","inputSchema": {- "type": "object","properties": {"approval-policy": {"description": "Approval policy for shell commands generated by the model: `untrusted`, `on-failure`, `on-request`, `never`.",@@ -261,26 +258,29 @@ mod tests {],"type": "string"},- "sandbox": {- "description": "Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`.",- "enum": [- "read-only",- "workspace-write",- "danger-full-access"- ],+ "base-instructions": {+ "description": "The set of instructions to use instead of the default ones.",+ "type": "string"+ },+ "compact-prompt": {+ "description": "Prompt used when compacting the conversation.","type": "string"},"config": {- "description": "Individual config settings that will override what is in CODEX_HOME/config.toml.","additionalProperties": true,+ "description": "Individual config settings that will override what is in CODEX_HOME/config.toml.","type": "object"},"cwd": {"description": "Working directory for the session. If relative, it is resolved against the server process's current working directory.","type": "string"},+ "developer-instructions": {+ "description": "Developer instructions that should be injected as a developer role message.",+ "type": "string"+ },"model": {- "description": "Optional override for the model name (e.g. \"o3\", \"o4-mini\").",+ "description": "Optional override for the model name (e.g. 'gpt-5.2', 'gpt-5.2-codex').","type": "string"},"profile": {@@ -291,23 +291,23 @@ mod tests {"description": "The *initial user prompt* to start the Codex conversation.","type": "string"},- "base-instructions": {- "description": "The set of instructions to use instead of the default ones.",- "type": "string"- },- "developer-instructions": {- "description": "Developer instructions that should be injected as a developer role message.",- "type": "string"- },- "compact-prompt": {- "description": "Prompt used when compacting the conversation.",+ "sandbox": {+ "description": "Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`.",+ "enum": [+ "read-only",+ "workspace-write",+ "danger-full-access"+ ],"type": "string"- },+ }},"required": ["prompt"- ]- }+ ],+ "type": "object"+ },+ "name": "codex",+ "title": "Codex"});assert_eq!(expected_tool_json, tool_json);}