-
Your Name authored
Add three key improvements to ClaudeProviderHandler based on comparison with vendors/kilocode implementation: 1. Tool Call ID Sanitization (_sanitize_tool_call_id): - Replace invalid characters in tool call IDs with underscores - Claude API requires alphanumeric, underscore, hyphen only - Reference: vendors/kilocode normalizeMessages() sanitization 2. Empty Content Filtering (_filter_empty_content): - Filter out empty string messages and empty text parts - Claude API rejects messages with empty content - Reference: vendors/kilocode normalizeMessages() filtering 3. Prompt Caching (_apply_cache_control): - Apply ephemeral cache_control to last 2 messages - Enable Anthropic's prompt caching feature for cost savings - Reference: vendors/kilocode applyCaching() All methods integrated into _convert_messages_to_anthropic() for automatic application during message conversion.
cc941d28