vercel/ai · error · UnsupportedFunctionalityError
image file parts with text data
Error message
image file parts with text data
What it means
Error "image file parts with text data" thrown in vercel/ai.
Source
Thrown at packages/cohere/src/convert-to-cohere-chat-prompt.ts:216
return { messages, documents, warnings };
}
function buildImageUrl({ part }: { part: LanguageModelV4FilePart }): string {
switch (part.data.type) {
case 'url': {
return part.data.url.toString();
}
case 'data': {
return `data:${resolveFullMediaType({ part })};base64,${convertToBase64(part.data.data)}`;
}
case 'reference': {
throw new UnsupportedFunctionalityError({
functionality: 'image file parts with provider references',
});
}
case 'text': {
throw new UnsupportedFunctionalityError({
functionality: 'image file parts with text data',
});
}
}
}
View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/cohere/src/convert-to-cohere-chat-prompt.ts:216 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/b16d6f6e55207de3.
Report an issue: GitHub.