Files
CLIProxyAPIPlus/internal
taetaetae b45ede0b71 fix(kiro): handle empty content in messages to prevent Bad Request errors
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
2026-02-01 15:47:18 +09:00
..
2025-10-26 07:46:04 +08:00
2026-02-01 07:37:30 +08:00
2026-01-30 21:34:30 +08:00
2026-01-20 13:50:41 +08:00
2026-02-01 07:37:30 +08:00
2026-02-01 07:37:30 +08:00
2026-01-30 20:45:33 +08:00