Skip to content

Bug: gemini-2.0-flash model is deprecated and returns 404 error #1

@adithya-n05

Description

@adithya-n05

Description

The main.py uses gemini-2.0-flash as the cloud model, but this model has been deprecated by Google and is no longer available to new users.

Error

google.genai.errors.ClientError: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'This model models/gemini-2.0-flash is no longer available to new users. Please update your code to use a newer model for the latest features and improvements.', 'status': 'NOT_FOUND'}}

Location

main.py line 75:

gemini_response = client.models.generate_content(
    model="gemini-2.0-flash",  # <-- deprecated
    ...
)

Suggested Fix

Update to gemini-2.5-flash which is the current stable model:

model="gemini-2.5-flash"

Available Alternatives

Model Description
gemini-2.5-flash Best price-performance, stable (recommended)
gemini-2.5-flash-lite Fastest, most budget-friendly
gemini-2.5-pro Most advanced for complex tasks
gemini-1.5-flash Older but reliable

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