Skip to content

GoogleGenerativeAIFetchError: [500 Internal Server Error] Failed to convert server response to JSON #177

@BleedingDev

Description

@BleedingDev

Description of the bug:

I am using GoogleAIFileManager from @google/generative-ai/server at version 0.13.0, but it was broken even in version 0.12.

No matter the file I try to upload, so that I can use it later on for the model I get this error:

GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/files: [500 Internal Server Error] Failed to convert server response to JSON

It was working well in few days ago, but then out of nowhere I started getting errors like this and nothing helped.

Actual vs expected behavior:

Expected

Upload file without any problem.

Actual

GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/files: [500 Internal Server Error] Failed to convert server response to JSON

Any other information you'd like to share?

Not just upload file, but also delete file method is broken and it all leads to the function makeFilesRequest.

But it is probably not in the SDK as even Postman fails with direct POST/GET request to the API.
image

Metadata

Metadata

Assignees

Labels

component:gemini apiIssue related to gemini apip1status:triagedIssue/PR triaged to the corresponding sub-teamtype:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions