You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Description
I encountered a critical issue that likely affects many new developers adopting the Gemini API via Vertex AI/Google AI Studio.
The Problem:
My new Google Cloud project (deployed on Cloud Run, region europe-west4, target us-central1) received persistent 404 Not Found errors when trying to access standard models like gemini-1.5-flash or gemini-pro.
The error message: [404 Not Found] models/gemini-1.5-flash is not found for API version v1beta
The Investigation:
After debugging and running a "Model Spy" script (listing all available models via API Key), I discovered that my project DOES NOT have access to v1.5 models at all.
However, it DOES have access to:
models/gemini-2.0-flash
models/gemini-2.5-flash
models/gemini-flash-latest
The Conflict:
The documentation and many code examples imply that gemini-1.5-flash is the stable standard. The library does not handle this gracefully. If a user tries the "standard" path, they hit a 404 wall and assume the service is broken.
Proposal:
The SDK should support a "smart fallback" or auto-discovery mechanism. If the requested model returns 404, it should check listModels() and suggest/use an available model (e.g., v2.0).
Or, documentation must explicitly state that new accounts might ONLY have access to v2.x models.
Environment:
Package: @google/generative-ai (initially ^0.11.0, updated to ^0.21.0)
Platform: Google Cloud Run
Region: us-central1 (Vertex), Europe (Client)
This issue caused significant development delays. Please improve the developer experience for new accounts that are "born" into the Gemini 2.0 era and lack legacy 1.5 access.
Description of the bug:
Description
I encountered a critical issue that likely affects many new developers adopting the Gemini API via Vertex AI/Google AI Studio.
The Problem:
My new Google Cloud project (deployed on Cloud Run, region
europe-west4, targetus-central1) received persistent404 Not Founderrors when trying to access standard models likegemini-1.5-flashorgemini-pro.The error message:
[404 Not Found] models/gemini-1.5-flash is not found for API version v1betaThe Investigation:
After debugging and running a "Model Spy" script (listing all available models via API Key), I discovered that my project DOES NOT have access to v1.5 models at all.
However, it DOES have access to:
models/gemini-2.0-flashmodels/gemini-2.5-flashmodels/gemini-flash-latestThe Conflict:
The documentation and many code examples imply that
gemini-1.5-flashis the stable standard. The library does not handle this gracefully. If a user tries the "standard" path, they hit a 404 wall and assume the service is broken.Proposal:
listModels()and suggest/use an available model (e.g., v2.0).Environment:
@google/generative-ai(initially ^0.11.0, updated to ^0.21.0)This issue caused significant development delays. Please improve the developer experience for new accounts that are "born" into the Gemini 2.0 era and lack legacy 1.5 access.
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response