mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-08 10:47:48 +08:00
fix: skip image parts for DeepSeek to avoid unknown variant "image_url"
This commit is contained in:
+11
-6
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user