{"record":{"id":"d43a4ff02050c105","repo":"vercel/ai","slug":"image-file-parts-with-provider-references","errorCode":null,"errorMessage":"image file parts with provider references","messagePattern":"image file parts with provider references","errorType":"exception","errorClass":"UnsupportedFunctionalityError","httpStatus":null,"severity":"error","filePath":"packages/cohere/src/convert-to-cohere-chat-prompt.ts","lineNumber":211,"sourceCode":"        const _exhaustiveCheck: never = role;\n        throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n\n  return { messages, documents, warnings };\n}\n\nfunction buildImageUrl({ part }: { part: LanguageModelV4FilePart }): string {\n  switch (part.data.type) {\n    case 'url': {\n      return part.data.url.toString();\n    }\n    case 'data': {\n      return `data:${resolveFullMediaType({ part })};base64,${convertToBase64(part.data.data)}`;\n    }\n    case 'reference': {\n      throw new UnsupportedFunctionalityError({\n        functionality: 'image file parts with provider references',\n      });\n    }\n    case 'text': {\n      throw new UnsupportedFunctionalityError({\n        functionality: 'image file parts with text data',\n      });\n    }\n  }\n}\n","sourceCodeStart":193,"sourceCodeEnd":222,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/cohere/src/convert-to-cohere-chat-prompt.ts#L193-L222","documentation":"Error \"image file parts with provider references\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/cohere/src/convert-to-cohere-chat-prompt.ts:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}