Update README

This commit is contained in:
YeonGyu-Kim
2025-12-16 21:02:38 +09:00
parent 72d9d1385b
commit 846bb7a6de
4 changed files with 97 additions and 24 deletions

View File

@@ -47,7 +47,10 @@ export function createEmptyMessageSanitizerHook(): MessagesTransformHook {
const parts = message.parts
if (!hasValidContent(parts) && parts.length > 0) {
// FIX: Removed `&& parts.length > 0` - empty arrays also need sanitization
// When parts is [], the message has no content and would cause API error:
// "all messages must have non-empty content except for the optional final assistant message"
if (!hasValidContent(parts)) {
let injected = false
for (const part of parts) {