fix: skip image parts for DeepSeek to avoid unknown variant "image_url"

This commit is contained in:
Your Name
2025-12-19 12:07:06 +08:00
parent f65ef548b2
commit 0d50a179aa
+11 -6
View File
@@ -355,12 +355,17 @@ ${userInputText}
]
// Add image parts back
for (const filePart of fileParts) {
contentParts.push({
type: "image",
image: filePart.url,
mimeType: filePart.mediaType,
})
const allowImages =
typeof modelId === "string" &&
!modelId.toLowerCase().includes("deepseek")
if (allowImages) {
for (const filePart of fileParts) {
contentParts.push({
type: "image",
image: filePart.url,
mimeType: filePart.mediaType,
})
}
}
enhancedMessages = [