[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[v0](/c/v0/59)

# Vercel serverless environment errors with pdf-parse and OpenAI SDK

25 views · 0 likes · 2 posts


Estudiomotim 4357 (@estudiomotim-4357) · 2026-03-04

## Problem
I am building a menu scanning app with PDF upload support using `OPENAI_API_KEY` directly (not AI Gateway). While image uploads work correctly, PDF processing fails in the Vercel serverless environment.

## Errors Encountered

1. **OpenAI SDK Error:**
> **Error: "Unsupported model version v1 for provider ‘openai.chat’"**
Occurs when using the `@ai-sdk/openai` package.

2. **pdf-parse Library Error:**
> **Error: "Cannot convert argument to a ByteString because the character at index 7 has a value of 8230"**

## Environment Details
- The `pdf-parse` library appears to be incompatible with Vercel’s serverless environment.
- Image uploads are functioning as expected.

## Current Status
For now, the app works with photo uploads only. Users must take a photo of the menu instead of uploading a PDF.

To contact Vercel support directly, go to: [vercel.com/help](https://vercel.com/help)


Community Backoffice (@community-backoffice) · 2026-03-06

Hey! To help debug your v0 project, could you share your **v0 chat link**?
It looks like `https://v0.app/chat/...` — you can copy it from your browser's address bar while in the chat.

You'll also need to unlist the chat so our team can view it — here's how: https://v0.app/docs/sharing

This helps the team reproduce what you're seeing much faster. Thanks!