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

Commit fdd4e8c

Browse files
Fix #759: Add documentation for invalid model name error
Resolves issue where users encounter 'Requests Error' when using invalid model name 'Gemini-3-Pro-Preview' with Roocode VSCode extension. Problem: - Users attempting to use 'Gemini-3-Pro-Preview' model name - This model name does not exist in Google's Gemini API - Causes API requests to fail with service unavailable errors - Affects third-party tools like Roocode VSCode extension Solution: - Comprehensive documentation explaining the issue - User-friendly fix guide for Roocode users - Verification tool to test API connectivity and list valid models - Migration guidance to new Google Gen AI SDK Files Added: - ISSUE_759_README.md: Main entry point with quick fixes - ISSUE_759_SUMMARY.md: Complete solution documentation - ISSUE_759_RESOLUTION.md: Technical analysis and migration guide - ROOCODE_FIX_GUIDE.md: Step-by-step fix for Roocode users - verify_models.py: Python tool to verify API and list models Valid Model Names: - gemini-2.0-flash (recommended) - gemini-1.5-pro - gemini-1.5-flash This is a configuration issue, not a bug in the SDK. The SDK is deprecated and will reach EOL on November 30, 2025. Users should migrate to the new Google Generative AI SDK: https://github.com/googleapis/python-genai
1 parent 658b54b commit fdd4e8c

File tree

5 files changed

+724
-0
lines changed

5 files changed

+724
-0
lines changed

ISSUE_759_README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Issue #759 Resolution: Gemini-3-Pro-Preview Error
2+
3+
## 🎯 Quick Answer
4+
5+
The model name **"Gemini-3-Pro-Preview" does not exist**. Use `gemini-2.0-flash` instead.
6+
7+
## 📚 Documentation Files
8+
9+
This directory contains complete resolution documentation for Issue #759:
10+
11+
1. **[ISSUE_759_SUMMARY.md](./ISSUE_759_SUMMARY.md)** - Start here!
12+
- Executive summary
13+
- Quick fix guide
14+
- All resources in one place
15+
16+
2. **[ROOCODE_FIX_GUIDE.md](./ROOCODE_FIX_GUIDE.md)** - For Roocode users
17+
- Step-by-step fix instructions
18+
- Troubleshooting tips
19+
- Valid model names reference
20+
21+
3. **[ISSUE_759_RESOLUTION.md](./ISSUE_759_RESOLUTION.md)** - Technical details
22+
- Root cause analysis
23+
- Migration guide to new SDK
24+
- For developers integrating Gemini API
25+
26+
4. **[verify_models.py](./verify_models.py)** - Verification tool
27+
- Test your API key
28+
- List available models
29+
- Verify connectivity
30+
31+
## ⚡ Quick Fix
32+
33+
### For Roocode Users (VSCode Extension)
34+
35+
1. Open VSCode Settings: `Ctrl+,` or `Cmd+,`
36+
2. Search: "Roocode"
37+
3. Find model name setting
38+
4. Change to: `gemini-2.0-flash`
39+
5. Save and reload VSCode
40+
41+
### Valid Model Names
42+
43+
✅ Use these:
44+
- `gemini-2.0-flash` (recommended)
45+
- `gemini-1.5-pro`
46+
- `gemini-1.5-flash`
47+
48+
❌ Don't use:
49+
- `Gemini-3-Pro-Preview` (doesn't exist!)
50+
51+
## 🔧 Test Your Setup
52+
53+
```bash
54+
# Set your API key
55+
export GEMINI_API_KEY="your-api-key"
56+
57+
# Run verification script
58+
python verify_models.py
59+
```
60+
61+
## ⚠️ Important Notice
62+
63+
This SDK is **deprecated** and will reach End-of-Life on **November 30, 2025**.
64+
65+
**Migrate to new SDK:**
66+
- Repository: https://github.com/googleapis/python-genai
67+
- Migration Guide: https://ai.google.dev/gemini-api/docs/migrate
68+
69+
## 📖 Additional Resources
70+
71+
- **Get API Key:** https://aistudio.google.com/app/apikey
72+
- **Documentation:** https://ai.google.dev/gemini-api/docs
73+
- **Community Forum:** https://discuss.ai.google.dev/c/gemini-api/4
74+
75+
## 🤝 Contributing
76+
77+
Found this helpful? Have suggestions? Please contribute to the new SDK:
78+
- https://github.com/googleapis/python-genai
79+
80+
---
81+
82+
**Issue:** #759
83+
**Status:** ✅ Resolved
84+
**Type:** Configuration Error (Invalid Model Name)
85+
**Date:** December 12, 2024
86+

ISSUE_759_RESOLUTION.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Issue #759 Resolution: "Requests Error" with Roocode VSCode Extension
2+
3+
## Problem Summary
4+
5+
Users attempting to use "Gemini-3-Pro-Preview" with the Roocode VSCode extension are encountering "Requests Error" / "Service Unavailable" errors.
6+
7+
## Root Causes
8+
9+
### 1. Invalid Model Name
10+
The model name **"Gemini-3-Pro-Preview"** does not exist. This is causing the API requests to fail.
11+
12+
**Valid model names include:**
13+
- `gemini-1.5-flash` (recommended for most use cases)
14+
- `gemini-1.5-flash-latest`
15+
- `gemini-1.5-pro`
16+
- `gemini-1.5-pro-latest`
17+
- `gemini-2.0-flash` (newest model)
18+
- `gemini-2.0-flash-001`
19+
20+
### 2. Deprecated SDK
21+
This repository (`google-gemini/deprecated-generative-ai-python`) is **deprecated** and will reach End-of-Life on **November 30, 2025**.
22+
23+
## Solutions
24+
25+
### Immediate Fix for Roocode Users
26+
27+
If you're using the Roocode VSCode extension:
28+
29+
1. **Update your model configuration in Roocode settings:**
30+
- Open VSCode Settings (Ctrl/Cmd + ,)
31+
- Search for "Roocode"
32+
- Find the model name setting
33+
- Change `Gemini-3-Pro-Preview` to a valid model name like:
34+
- `gemini-2.0-flash` (newest, recommended)
35+
- `gemini-1.5-pro` (more capable for complex tasks)
36+
- `gemini-1.5-flash` (faster, good for most tasks)
37+
38+
2. **Verify your API key is valid:**
39+
- Ensure your Google AI API key is correctly configured
40+
- Get your API key from: https://aistudio.google.com/app/apikey
41+
42+
### Long-term Recommendation: Migrate to New SDK
43+
44+
All users should migrate to the **new [Google Generative AI SDK](https://github.com/googleapis/python-genai)**:
45+
46+
1. **Uninstall the old SDK:**
47+
```bash
48+
pip uninstall google-generativeai
49+
```
50+
51+
2. **Install the new SDK:**
52+
```bash
53+
pip install google-genai
54+
```
55+
56+
3. **Update your code:**
57+
58+
**Old SDK (deprecated):**
59+
```python
60+
import google.generativeai as genai
61+
62+
genai.configure(api_key="YOUR_API_KEY")
63+
model = genai.GenerativeModel("gemini-1.5-flash")
64+
response = model.generate_content("Hello")
65+
```
66+
67+
**New SDK (recommended):**
68+
```python
69+
from google import genai
70+
71+
client = genai.Client(api_key="YOUR_API_KEY")
72+
response = client.models.generate_content(
73+
model="gemini-1.5-flash",
74+
contents="Hello"
75+
)
76+
```
77+
78+
4. **Full migration guide:**
79+
- https://ai.google.dev/gemini-api/docs/migrate
80+
81+
## How to List Available Models
82+
83+
To see all currently available models, use:
84+
85+
```python
86+
import google.generativeai as genai
87+
88+
genai.configure(api_key="YOUR_API_KEY")
89+
90+
print("Models that support generateContent:")
91+
for m in genai.list_models():
92+
if 'generateContent' in m.supported_generation_methods:
93+
print(f" - {m.name}")
94+
```
95+
96+
Or via REST API:
97+
```bash
98+
curl https://generativelanguage.googleapis.com/v1beta/models?key=YOUR_API_KEY
99+
```
100+
101+
## For Third-Party Tool Developers (Roocode, etc.)
102+
103+
If you're developing tools that integrate with Google's Gemini API:
104+
105+
1. **Implement model name validation** before making API requests
106+
2. **Provide users with a dropdown** of valid model names instead of free-text input
107+
3. **Migrate to the new Google Gen AI SDK** for better long-term support
108+
4. **Handle API errors gracefully** with clear user-facing error messages
109+
5. **Keep model list updated** as new models are released
110+
111+
## Additional Resources
112+
113+
- **New SDK Repository:** https://github.com/googleapis/python-genai
114+
- **Migration Guide:** https://ai.google.dev/gemini-api/docs/migrate
115+
- **Gemini API Documentation:** https://ai.google.dev/gemini-api/docs
116+
- **Community Forum:** https://discuss.ai.google.dev/c/gemini-api/4
117+
- **Get API Key:** https://aistudio.google.com/app/apikey
118+
119+
## Status
120+
121+
- **Issue Type:** Configuration Error (Invalid Model Name)
122+
- **Affected Component:** Third-party VSCode extension (Roocode)
123+
- **SDK Status:** Deprecated (EOL: November 30, 2025)
124+
- **Recommended Action:** Update model name + Migrate to new SDK
125+
126+
---
127+
128+
**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.
129+

0 commit comments

Comments
 (0)