mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-03-22 09:10:30 +00:00
Problem: - OpenCode's /compaction command and auto-compaction (at 80%+ context) sends requests that can result in empty assistant message content - Kiro API strictly requires non-empty content for all messages - This causes 'Bad Request: Improperly formed request' errors - After compaction failure, the malformed message stays in history, breaking all subsequent requests in the session Solution: - Add fallback content for empty assistant messages in buildAssistantMessageFromOpenAI() - Add history truncation (max 50 messages) to prevent oversized requests - This ensures all messages have valid content before sending to Kiro API Fixes issues with: - /compaction command returning Bad Request - Auto-compaction breaking sessions - Conversations becoming unresponsive after compaction failure