So my app is based around field inspection services. It’s a series of clickable answers to a series of pertinent questions pertaining to the genre specifics of the inspection. I offer a function button to generate an AI summary of the collected data. The following is an error I can’t seem to shake: AI Generation Failed
The AI report could not be generated. The appendix data is still available below. Error: Failed to fetch from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: [404 Not Found] models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.
Any suggestions would be helpful please. And thank you.
This error usually isn’t random , it’s coming from the AI generation flow itself, not the UI or the inspection data.
The key part is this:
models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent
A few things to check:
AI flow configuration
If you’re using Firebase / Genkit, check your AI flow file (commonly in src/ai/flows/, or wherever your flows are defined). The model reference and method need to match what the API version actually supports.
Model + method mismatch
Some Gemini models aren’t available under certain API versions or don’t support generateContent. Calling ListModels will show which models and methods are currently supported for your project.
Environment / project mismatch
Make sure the project where the flow is running is the same one where the Generative Language API is enabled. This mismatch causes 404s more often than expected.
The bottom line: the issue is in the AI flow generating the content, not in the inspection logic itself.
If you want, feel free to share more details here — or reach out directly if you’d like someone to take a closer look at the AI flow and get it working properly.
Yeah it’s definitely something to do with gemini. I was locked out of my console recently and my API keys. Thank you for the help. I’m actually working with the gentleman a little later on to hopefully solve it. Thanks again