From 8519d29283b3c840e20519faae7fc0a62c19ebe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 16 Jul 2026 20:57:15 +0800 Subject: [PATCH] adjust system prompt to adapt to gpt 5.4 mini --- .../platform-editor-agent/src/agent/agent.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/server-rs/crates/platform-editor-agent/src/agent/agent.rs b/server-rs/crates/platform-editor-agent/src/agent/agent.rs index 6b9ee59f5..5f353b646 100644 --- a/server-rs/crates/platform-editor-agent/src/agent/agent.rs +++ b/server-rs/crates/platform-editor-agent/src/agent/agent.rs @@ -138,9 +138,7 @@ fn build_tools_system_prompt(base_prompt: &str, tool_specs: &[ToolPromptSpec]) - prompt.push_str("(No tools available.)\n"); } else { prompt.push_str("## JSON Response Format\n"); - prompt.push_str( - "When you need to use a tool, respond with valid JSON only (no markdown fences):\n", - ); + prompt.push_str("respond with valid JSON only (no markdown fences):\n"); prompt.push_str("{\n"); prompt.push_str(" \"reply_text\": \"your message to the user\",\n"); prompt.push_str(" \"tool_calls\": [\n {\n"); @@ -165,17 +163,13 @@ fn build_tools_system_prompt(base_prompt: &str, tool_specs: &[ToolPromptSpec]) - prompt.push_str("\n"); } - prompt.push_str( - "return your response immediately without expecting further tool execution. ", - ); prompt.push_str( "as you see, tool_calls is an array, several tools calls can be executed in one turn concurrently. ", ); - prompt.push_str("For example: `\"reply_text\": \"Task complete. \"`."); - prompt.push_str("\n"); - prompt.push_str("IMPORTANT: Always respond with valid JSON only. "); + prompt.push_str("your valid tool call will be recorded as system message"); prompt.push_str( - "Do not wrap the JSON in markdown code fences or add extra text outside the JSON.", + "some tools calls needs user's confirmation, you should not retry the same tool call in this case.\ + And if all tool calls are pending confirmation, you should just end the turn, as you cant do more before user's action" ); }