Structured output with fileData of a large file (>20mb) fails with error #329
Labels
component:js sdk
Issue/PR related to JavaScript SDK
status:triaged
Issue/PR triaged to the corresponding sub-team
type:bug
Something isn't working
Description of the bug:
I'm getting an unknown error when I use structured output with fileData of a large file (>20mb).
Error:
GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: [400 Bad Request] Request contains an invalid argument
What I have tested, works when files are smaller or when I remove structured output but files are larger.
Actual vs expected behavior:
Reproducible snippet:
What responseSchema looks like:
Reference filed use to test: https://uuvhpoxkzjnrvvajhnyb.supabase.co/storage/v1/object/sign/default/58%20MIN%20Creepy%20Shocking%20Videos%20You%20Must%20See%20Before%20They%20Disappear%20(128kbit_AAC)333.mp3?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJkZWZhdWx0LzU4IE1JTiBDcmVlcHkgU2hvY2tpbmcgVmlkZW9zIFlvdSBNdXN0IFNlZSBCZWZvcmUgVGhleSBEaXNhcHBlYXIgKDEyOGtiaXRfQUFDKTMzMy5tcDMiLCJpYXQiOjE3Mzc4NjE2ODIsImV4cCI6MTc0MDQ1MzY4Mn0.mbYVrBvon4EAU8XNvf3zjPlDiyNQfqW7eFCXDmtEWsU&t=2025-01-26T03%3A21%3A22.281Z
Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: