feat: implement comprehensive thinking modes and migrate to google-genai

Major improvements to thinking capabilities and API integration:

- Remove all output token limits for future-proof responses
- Add 5-level thinking mode system: minimal, low, medium, high, max
- Migrate from google-generativeai to google-genai library
- Implement native thinkingBudget support for Gemini 2.5 Pro
- Set medium thinking as default for all tools, max for think_deeper

🧠 Thinking Modes:
- minimal (128 tokens) - simple tasks
- low (2048 tokens) - basic reasoning
- medium (8192 tokens) - default for most tools
- high (16384 tokens) - complex analysis
- max (32768 tokens) - default for think_deeper

🔧 Technical Changes:
- Complete migration to google-genai>=1.19.0
- Remove google-generativeai dependency
- Add ThinkingConfig with thinking_budget parameter
- Update all tools to support thinking_mode parameter
- Comprehensive test suite with 37 passing unit tests
- CI-friendly testing (no API key required for unit tests)
- Live integration tests for API verification

🧪 Testing & CI:
- Add GitHub Actions workflow with multi-Python support
- Unit tests use mocks, no API key required
- Live integration tests optional with API key
- Contributing guide with development setup
- All tests pass without external dependencies

🐛 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-09 09:35:21 +04:00
parent 9d45207d3f
commit fb5c04ea60
17 changed files with 813 additions and 171 deletions

View File

@@ -14,7 +14,7 @@ if readme_path.exists():
setup(
name="gemini-mcp-server",
version="2.5.0",
version="2.7.0",
description="Model Context Protocol server for Google Gemini",
long_description=long_description,
long_description_content_type="text/markdown",
@@ -23,7 +23,7 @@ setup(
py_modules=["gemini_server"],
install_requires=[
"mcp>=1.0.0",
"google-generativeai>=0.8.0",
"google-genai>=1.19.0",
"python-dotenv>=1.0.0",
],
extras_require={