Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions ISSUE_759_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Issue #759 Resolution: Gemini-3-Pro-Preview Error

## 🎯 Quick Answer

The model name **"Gemini-3-Pro-Preview" does not exist**. Use `gemini-2.0-flash` instead.

## 📚 Documentation Files

This directory contains complete resolution documentation for Issue #759:

1. **[ISSUE_759_SUMMARY.md](./ISSUE_759_SUMMARY.md)** - Start here!
- Executive summary
- Quick fix guide
- All resources in one place

2. **[ROOCODE_FIX_GUIDE.md](./ROOCODE_FIX_GUIDE.md)** - For Roocode users
- Step-by-step fix instructions
- Troubleshooting tips
- Valid model names reference

3. **[ISSUE_759_RESOLUTION.md](./ISSUE_759_RESOLUTION.md)** - Technical details
- Root cause analysis
- Migration guide to new SDK
- For developers integrating Gemini API

4. **[verify_models.py](./verify_models.py)** - Verification tool
- Test your API key
- List available models
- Verify connectivity

## ⚡ Quick Fix

### For Roocode Users (VSCode Extension)

1. Open VSCode Settings: `Ctrl+,` or `Cmd+,`
2. Search: "Roocode"
3. Find model name setting
4. Change to: `gemini-2.0-flash`
5. Save and reload VSCode

### Valid Model Names

✅ Use these:
- `gemini-2.0-flash` (recommended)
- `gemini-1.5-pro`
- `gemini-1.5-flash`

❌ Don't use:
- `Gemini-3-Pro-Preview` (doesn't exist!)

## 🔧 Test Your Setup

```bash
# Set your API key
export GEMINI_API_KEY="your-api-key"

# Run verification script
python verify_models.py
```

## ⚠️ Important Notice

This SDK is **deprecated** and will reach End-of-Life on **November 30, 2025**.

**Migrate to new SDK:**
- Repository: https://github.com/googleapis/python-genai
- Migration Guide: https://ai.google.dev/gemini-api/docs/migrate

## 📖 Additional Resources

- **Get API Key:** https://aistudio.google.com/app/apikey
- **Documentation:** https://ai.google.dev/gemini-api/docs
- **Community Forum:** https://discuss.ai.google.dev/c/gemini-api/4

## 🤝 Contributing

Found this helpful? Have suggestions? Please contribute to the new SDK:
- https://github.com/googleapis/python-genai

---

**Issue:** #759
**Status:** ✅ Resolved
**Type:** Configuration Error (Invalid Model Name)
**Date:** December 12, 2024

129 changes: 129 additions & 0 deletions ISSUE_759_RESOLUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Issue #759 Resolution: "Requests Error" with Roocode VSCode Extension

## Problem Summary

Users attempting to use "Gemini-3-Pro-Preview" with the Roocode VSCode extension are encountering "Requests Error" / "Service Unavailable" errors.

## Root Causes

### 1. Invalid Model Name
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-latest`
- `gemini-1.5-pro`
- `gemini-1.5-pro-latest`
- `gemini-2.0-flash` (newest model)
- `gemini-2.0-flash-001`

### 2. Deprecated SDK
This repository (`google-gemini/deprecated-generative-ai-python`) is **deprecated** and will reach End-of-Life on **November 30, 2025**.

## Solutions

### Immediate Fix for Roocode Users

If you're using the Roocode VSCode extension:

1. **Update your model configuration in Roocode settings:**
- Open VSCode Settings (Ctrl/Cmd + ,)
- Search for "Roocode"
- Find the model name setting
- Change `Gemini-3-Pro-Preview` to 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)

2. **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

### Long-term Recommendation: Migrate to New SDK

All users should migrate to the **new [Google Generative AI SDK](https://github.com/googleapis/python-genai)**:

1. **Uninstall the old SDK:**
```bash
pip uninstall google-generativeai
```

2. **Install the new SDK:**
```bash
pip install google-genai
```

3. **Update your code:**

**Old SDK (deprecated):**
```python
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):**
```python
from google import genai

client = genai.Client(api_key="YOUR_API_KEY")
response = client.models.generate_content(
model="gemini-1.5-flash",
contents="Hello"
)
```

4. **Full migration guide:**
- https://ai.google.dev/gemini-api/docs/migrate

## How to List Available Models

To see all currently available models, use:

```python
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:
```bash
curl https://generativelanguage.googleapis.com/v1beta/models?key=YOUR_API_KEY
```

## For Third-Party Tool Developers (Roocode, etc.)

If you're developing tools that integrate with Google's Gemini API:

1. **Implement model name validation** before making API requests
2. **Provide users with a dropdown** of valid model names instead of free-text input
3. **Migrate to the new Google Gen AI SDK** for better long-term support
4. **Handle API errors gracefully** with clear user-facing error messages
5. **Keep model list updated** as new models are released

## Additional Resources

- **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

## Status

- **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.

Loading