Skip to content

[Bug]: Invalid model name: gemini/imagen-4.0-fast-generate-preview-06-06 not supported by Gemini API #13851

@tjx666

Description

@tjx666

What happened?

The model imagen-4.0-fast-generate-preview-06-06 is configured in model_prices_and_context_window.json for the gemini provider, but this model does not exist in the Gemini API, causing 404 errors when attempting to use it.

Expected behavior: The model should work or be removed from the configuration if it's invalid.

Actual behavior: Getting a 404 NOT_FOUND error when trying to use this model with the Gemini provider.

Relevant log output

Google AI image generation error: Error [ApiError]: {"error":{"message":"{\n  \"error\": {\n    \"code\": 404,\n    \"message\": \"models/imagen-4.0-fast-generate-preview-06-06 is not found for API version v1beta, or is not supported for predict. Call ListModels to see the list of available models and their supported methods.\",\n    \"status\": \"NOT_FOUND\"\n  }\n}\n","type":"None","param":"None","code":"404"}

Additional Context

Current configuration in model_prices_and_context_window.json:

"gemini/imagen-4.0-fast-generate-preview-06-06": {
    "output_cost_per_image": 0.02,
    "litellm_provider": "gemini",
    "mode": "image_generation",
    "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
}

The same model is also configured for Vertex AI:

"vertex_ai/imagen-4.0-fast-generate-preview-06-06": {
    "output_cost_per_image": 0.02,
    "litellm_provider": "vertex_ai-image-models",
    "mode": "image_generation",
    "source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
}

Suggested fix: Remove the gemini/imagen-4.0-fast-generate-preview-06-06 configuration since this model is not supported by the Gemini API, while keeping the Vertex AI configuration if that provider supports it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions