Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Critical UX/DX Fail: New Cloud Projects get 404 on default models (gemini-1.5). Library needs auto-discovery or updated defaults. #493

@ConceptModul

Description

@ConceptModul

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, 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:

  1. 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).
  2. 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.

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions