vercel/ai · error · UnsupportedFunctionalityError

File URL data

Error message

File URL data

What it means

Error "File URL data" thrown in vercel/ai.

Source

Thrown at packages/cohere/src/convert-to-cohere-chat-prompt.ts:83

                  image_url: {
                    url,
                    ...(cohereOptions.detail
                      ? { detail: cohereOptions.detail }
                      : {}),
                  },
                });
                break;
              }

              let textContent: string;
              switch (part.data.type) {
                case 'reference': {
                  throw new UnsupportedFunctionalityError({
                    functionality: 'file parts with provider references',
                  });
                }
                case 'url': {
                  throw new UnsupportedFunctionalityError({
                    functionality: 'File URL data',
                    message:
                      'URLs should be downloaded by the AI SDK and not reach this point. This indicates a configuration issue.',
                  });
                }
                case 'text': {
                  textContent = part.data.text;
                  break;
                }
                case 'data': {
                  textContent =
                    typeof part.data.data === 'string'
                      ? part.data.data
                      : new TextDecoder().decode(part.data.data);
                  break;
                }
              }

View on GitHub (pinned to 69428b1f8b)

When it happens

Trigger: Thrown at packages/cohere/src/convert-to-cohere-chat-prompt.ts:83 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/a44ff528a1891f62. Report an issue: GitHub.