diff --git a/internal/translator/kiro/claude/kiro_claude_request.go b/internal/translator/kiro/claude/kiro_claude_request.go index 316bf9ff..b3742f22 100644 --- a/internal/translator/kiro/claude/kiro_claude_request.go +++ b/internal/translator/kiro/claude/kiro_claude_request.go @@ -17,6 +17,7 @@ import ( "github.com/tidwall/gjson" ) + // Kiro API request structs - field order determines JSON key order // KiroPayload is the top-level request structure for Kiro API @@ -33,6 +34,7 @@ type KiroInferenceConfig struct { TopP float64 `json:"topP,omitempty"` } + // KiroConversationState holds the conversation context type KiroConversationState struct { ChatTriggerType string `json:"chatTriggerType"` // Required: "MANUAL" - must be first field @@ -378,6 +380,7 @@ func hasThinkingTagInBody(body []byte) bool { return strings.Contains(bodyStr, "") || strings.Contains(bodyStr, "") } + // IsThinkingEnabledFromHeader checks if thinking mode is enabled via Anthropic-Beta header. // Claude CLI uses "Anthropic-Beta: interleaved-thinking-2025-05-14" to enable thinking. func IsThinkingEnabledFromHeader(headers http.Header) bool { @@ -517,15 +520,6 @@ func convertClaudeToolsToKiro(tools gjson.Result) []KiroToolWrapper { for _, tool := range tools.Array() { name := tool.Get("name").String() - - // Filter out web_search/websearch tools (Kiro API doesn't support them) - // This matches the behavior in AIClient-2-API/claude-kiro.js - nameLower := strings.ToLower(name) - if nameLower == "web_search" || nameLower == "websearch" { - log.Debugf("kiro: skipping unsupported tool: %s", name) - continue - } - description := tool.Get("description").String() inputSchemaResult := tool.Get("input_schema") var inputSchema interface{}