From 98edcad39d77391f30b027e3f5fae9c1929911cb Mon Sep 17 00:00:00 2001 From: Joao Date: Fri, 6 Feb 2026 16:42:21 +0000 Subject: [PATCH] fix: replace assistant placeholder text to prevent model parroting Kiro API requires non-empty content on assistant messages, so CLIProxyAPI injects placeholder text when assistant messages only contain tool_use blocks (no text). The previous placeholders were conversational phrases: - DefaultAssistantContentWithTools: "I'll help you with that." - DefaultAssistantContent: "I understand." In agentic sessions with many tool calls, these phrases appeared dozens of times in conversation history. Opus 4.6 (and likely other models) picked up on this pattern and started parroting "I'll help you with that." before every tool call in its actual responses. Fix: Replace both placeholders with a single dot ".", which satisfies Kiro's non-empty requirement without giving the model a phrase to mimic. --- internal/translator/kiro/common/constants.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/translator/kiro/common/constants.go b/internal/translator/kiro/common/constants.go index ab000972..f5e5a99d 100644 --- a/internal/translator/kiro/common/constants.go +++ b/internal/translator/kiro/common/constants.go @@ -31,11 +31,15 @@ const ( // DefaultAssistantContentWithTools is the fallback content for assistant messages // that have tool_use but no text content. Kiro API requires non-empty content. - DefaultAssistantContentWithTools = "I'll help you with that." + // IMPORTANT: Use a minimal neutral string that the model won't mimic in responses. + // Previously "I'll help you with that." which caused the model to parrot it back. + DefaultAssistantContentWithTools = "." // DefaultAssistantContent is the fallback content for assistant messages // that have no content at all. Kiro API requires non-empty content. - DefaultAssistantContent = "I understand." + // IMPORTANT: Use a minimal neutral string that the model won't mimic in responses. + // Previously "I understand." which could leak into model behavior. + DefaultAssistantContent = "." // KiroAgenticSystemPrompt is injected only for -agentic models to prevent timeouts on large writes. // AWS Kiro API has a 2-3 minute timeout for large file write operations.