Users attempting to use "Gemini-3-Pro-Preview" with the Roocode VSCode extension are encountering "Requests Error" / "Service Unavailable" errors.
The model name "Gemini-3-Pro-Preview" does not exist. This is causing the API requests to fail.
Valid model names include:
gemini-1.5-flash(recommended for most use cases)gemini-1.5-flash-latestgemini-1.5-progemini-1.5-pro-latestgemini-2.0-flash(newest model)gemini-2.0-flash-001
This repository (google-gemini/deprecated-generative-ai-python) is deprecated and will reach End-of-Life on November 30, 2025.
If you're using the Roocode VSCode extension:
-
Update your model configuration in Roocode settings:
- Open VSCode Settings (Ctrl/Cmd + ,)
- Search for "Roocode"
- Find the model name setting
- Change
Gemini-3-Pro-Previewto a valid model name like:gemini-2.0-flash(newest, recommended)gemini-1.5-pro(more capable for complex tasks)gemini-1.5-flash(faster, good for most tasks)
-
Verify your API key is valid:
- Ensure your Google AI API key is correctly configured
- Get your API key from: https://aistudio.google.com/app/apikey
All users should migrate to the new Google Generative AI SDK:
-
Uninstall the old SDK:
pip uninstall google-generativeai
-
Install the new SDK:
pip install google-genai
-
Update your code:
Old SDK (deprecated):
import google.generativeai as genai genai.configure(api_key="YOUR_API_KEY") model = genai.GenerativeModel("gemini-1.5-flash") response = model.generate_content("Hello")
New SDK (recommended):
from google import genai client = genai.Client(api_key="YOUR_API_KEY") response = client.models.generate_content( model="gemini-1.5-flash", contents="Hello" )
-
Full migration guide:
To see all currently available models, use:
import google.generativeai as genai
genai.configure(api_key="YOUR_API_KEY")
print("Models that support generateContent:")
for m in genai.list_models():
if 'generateContent' in m.supported_generation_methods:
print(f" - {m.name}")Or via REST API:
curl https://generativelanguage.googleapis.com/v1beta/models?key=YOUR_API_KEYIf you're developing tools that integrate with Google's Gemini API:
- Implement model name validation before making API requests
- Provide users with a dropdown of valid model names instead of free-text input
- Migrate to the new Google Gen AI SDK for better long-term support
- Handle API errors gracefully with clear user-facing error messages
- Keep model list updated as new models are released
- New SDK Repository: https://github.com/googleapis/python-genai
- Migration Guide: https://ai.google.dev/gemini-api/docs/migrate
- Gemini API Documentation: https://ai.google.dev/gemini-api/docs
- Community Forum: https://discuss.ai.google.dev/c/gemini-api/4
- Get API Key: https://aistudio.google.com/app/apikey
- Issue Type: Configuration Error (Invalid Model Name)
- Affected Component: Third-party VSCode extension (Roocode)
- SDK Status: Deprecated (EOL: November 30, 2025)
- Recommended Action: Update model name + Migrate to new SDK
Note: This issue is not a bug in the SDK itself, but rather a configuration issue in the third-party Roocode extension using an invalid model name. Since this SDK is deprecated, users should migrate to the new Google Generative AI SDK for continued support.