I’m experiencing consistent 500 Internal Server errors when trying to use the gemini-2.0-flash-thinking-exp-1219 model for image analysis. Here are the details:
Issue:
- Error message: 500 INTERNAL {“error”: {“code”: 500, “message”: “An internal error has occurred”, “status”: “INTERNAL”}}
- Model: gemini-2.0-flash-thinking-exp-1219
- Request type: Image analysis
- File format: JPEG
- API version: google-generativeai latest
Steps to reproduce:
- Initialize the Gemini client with valid API key
- Load a JPEG image file
- Send a generate_content request to the thinking model
- Receive 500 Internal Server Error
Additional information:
- The same code works correctly with gemini-2.0-flash-exp model
- The error is consistent and occurs on multiple attempts
- Image file is valid and works with other models
- No issues with API key or authentication
Code sample:
response = client.models.generate_content(
model='gemini-2.0-flash-thinking-exp-1219',
contents=[
'What do you see in the image?',
types.Part.from_bytes(
data=image_bytes,
mime_type='image/jpeg'
)
]
)