Issue Summary
I'm consistently getting 404 Not Found errors when calling gemini-1.5-flash from Portugal (EU) using @google/generative-ai@0.21.0 across all API versions. The same code works correctly from US-based servers.
Note: I understand this issue is being filed against the new @google/genai SDK repository, but I'm currently using the deprecated @google/generative-ai SDK (v0.21.0). I'm reporting this here because the deprecated repository is now read-only. If this is a regional API availability issue, it likely affects both SDKs.
Error Message
[GoogleGenerativeAI Error]: Error fetching from
https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent:
models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent.
Environment Details
- Location: Portugal (Coimbra, PT) – EU region
- SDK:
@google/generative-ai@0.21.0 (deprecated SDK)
- Model:
gemini-1.5-flash
- API versions tried:
v1beta with grounding tools → 404
v1beta without tools → 404
v1 explicit → 404
- Auto-detect (no
apiVersion) → 404
- API key: Valid and verified (works with other Google Cloud APIs)
- Network: No VPN, direct ISP connection
- Node.js: v20.11.0
- Browser: Chrome 131 (also tested Edge, Firefox)
Steps to Reproduce
- From Portugal (EU):
import { GoogleGenerativeAI } from "@google/generative-ai";
const apiKey = process.env.VITE_GEMINI_API_KEY;
const genAI = new GoogleGenerativeAI(apiKey);
// All of these fail with 404
const model1 = genAI.getGenerativeModel(
{ model: "gemini-1.5-flash" },
{ apiVersion: "v1beta" }
);
const result = await model1.generateContent("Test prompt");
// Error: 404 Not Found
- From US-based server: Same code works perfectly
Additional Context
- Timeline: This was working perfectly fine last weekend (around Jan 31, 2026) and started failing without any code changes
- Model name variations tested (all return 404 from Portugal):
gemini-1.5-flash
models/gemini-1.5-flash
gemini-1.5-flash-002
gemini-flash-latest
- Network troubleshooting:
- Disabled ad-blocker
- Cleared browser cache/service workers
- Tested in incognito mode
- Tried different browsers
- Tried direct HTTPS
fetch calls → same 404
Questions for Maintainers
- Regional availability: Is
gemini-1.5-flash currently restricted in EU regions (specifically Portugal)? Are there known regional restrictions or geofencing?
- EU DMA compliance: Could this be related to EU Digital Markets Act compliance measures?
- Model discovery: Is there an API endpoint to query available models by region, so developers can programmatically handle regional restrictions?
- Recommended alternatives: What model should EU users use if
gemini-1.5-flash is not available?
- Migration path: Should I migrate to the new
@google/genai SDK to resolve this? Would that help with regional availability?
Any guidance on whether this is a regional restriction, temporary outage, or configuration issue would be greatly appreciated.
Issue Summary
I'm consistently getting
404 Not Founderrors when callinggemini-1.5-flashfrom Portugal (EU) using@google/generative-ai@0.21.0across all API versions. The same code works correctly from US-based servers.Note: I understand this issue is being filed against the new
@google/genaiSDK repository, but I'm currently using the deprecated@google/generative-aiSDK (v0.21.0). I'm reporting this here because the deprecated repository is now read-only. If this is a regional API availability issue, it likely affects both SDKs.Error Message
Environment Details
@google/generative-ai@0.21.0(deprecated SDK)gemini-1.5-flashv1betawith grounding tools → 404v1betawithout tools → 404v1explicit → 404apiVersion) → 404Steps to Reproduce
Additional Context
gemini-1.5-flashmodels/gemini-1.5-flashgemini-1.5-flash-002gemini-flash-latestfetchcalls → same 404Questions for Maintainers
gemini-1.5-flashcurrently restricted in EU regions (specifically Portugal)? Are there known regional restrictions or geofencing?gemini-1.5-flashis not available?@google/genaiSDK to resolve this? Would that help with regional availability?Any guidance on whether this is a regional restriction, temporary outage, or configuration issue would be greatly appreciated.