Skip to content

Unable to upload PDF to vector files with "The file could not be parsed" #1496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
GRiDD opened this issue May 7, 2025 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@GRiDD
Copy link

GRiDD commented May 7, 2025

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

I am using nodejs sdk

"openai": "^4.97.0"

Got :

{
  result: {
    id: 'file-KD9fKNTgyPNSXmNgWpdpUn',
    object: 'vector_store.file',
    usage_bytes: 0,
    created_at: 1746646146,
    vector_store_id: 'vs_681bb47f51ec819188b63fff74653f81',
    status: 'failed',
    last_error: { code: 'invalid_file', message: 'The file could not be parsed.' },
    chunking_strategy: { type: 'static', static: [Object] },
    attributes: {}
  }
}
Image

This works fine with text based files and assistant

To Reproduce

        const fileContent = fs.createReadStream('Quick-Start.pdf');

        const vectorStore = await openai.vectorStores.create({
            name: "API docs",
        });

        const result = await openai.vectorStores.files.uploadAndPoll(vectorStore.id, fileContent);

        console.log({ result });

Code snippets

OS

macos

Node version

nextjs 14

Library version

4.97.0

@GRiDD GRiDD added the bug Something isn't working label May 7, 2025
@solidusite
Copy link

I’m experiencing the same issue. It would be helpful to get an official confirmation on whether this is a bug or a recent change in the API behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants