[Bug] Autopilot crashes with GoogleGenerativeAIFetchError 404 — model gemini-2.0-flash is no longer available
Author: psandersCreated Jun 23, 2026Updated Jul 22, 2026
Labelsbugvoice
Summary
Autopilot crashes on startup/request because the Google Generative AI model gemini-2.0-flash has been retired and returns a 404.
Steps to Reproduce
- Run autopilot with the current default Google GenAI configuration (model
gemini-2.0-flash). - Trigger a request that calls
generateContent. - Observe the unhandled rejection that crashes the process.
Expected Behavior
Autopilot should use a supported Gemini model and continue to generate content without crashing.
Actual Behavior
The request fails and crashes the process with:
GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent: [404 Not Found] This model models/gemini-2.0-flash is no longer available. Please update your code to use a newer model for the latest features and improvements.
at handleResponseNotOk (/home/appuser/autopilot/node_modules/@google/generative-ai/dist/index.js:434:11)
at async makeRequest (/home/appuser/autopilot/node_modules/@google/generative-ai/dist/index.js:403:9)
at async generateContent (/home/appuser/autopilot/node_modules/@google/generative-ai/dist/index.js:867:22)
at async /home/appuser/autopilot/node_modules/@langchain/google-genai/dist/chat_models.cjs:602:12
status: 404,
statusText: 'Not Found',
}Priority
P1 – High
Source: fonoster/fonoster