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>
69 lines
1.6 KiB
Python
69 lines
1.6 KiB
Python
"""
|
|
Configuration and constants for Gemini MCP Server
|
|
"""
|
|
|
|
# Version and metadata
|
|
__version__ = "2.7.0"
|
|
__updated__ = "2025-06-09"
|
|
__author__ = "Fahad Gilani"
|
|
|
|
# Model configuration
|
|
DEFAULT_MODEL = "gemini-2.5-pro-preview-06-05"
|
|
THINKING_MODEL = "gemini-2.0-flash-thinking-exp" # Enhanced reasoning model for think_deeper
|
|
MAX_CONTEXT_TOKENS = 1_000_000 # 1M tokens for Gemini Pro
|
|
|
|
# Temperature defaults for different tool types
|
|
TEMPERATURE_ANALYTICAL = 0.2 # For code review, debugging
|
|
TEMPERATURE_BALANCED = 0.5 # For general chat
|
|
TEMPERATURE_CREATIVE = 0.7 # For architecture, deep thinking
|
|
|
|
# Tool trigger phrases for natural language matching
|
|
TOOL_TRIGGERS = {
|
|
"think_deeper": [
|
|
"think deeper",
|
|
"ultrathink",
|
|
"extend my analysis",
|
|
"reason through",
|
|
"explore alternatives",
|
|
"challenge my thinking",
|
|
"deep think",
|
|
"extended thinking",
|
|
"validate my approach",
|
|
"find edge cases",
|
|
],
|
|
"review_code": [
|
|
"review",
|
|
"check for issues",
|
|
"find bugs",
|
|
"security check",
|
|
"code quality",
|
|
"audit",
|
|
"code review",
|
|
"check this code",
|
|
"review for",
|
|
"find vulnerabilities",
|
|
],
|
|
"debug_issue": [
|
|
"debug",
|
|
"error",
|
|
"failing",
|
|
"root cause",
|
|
"trace",
|
|
"why doesn't",
|
|
"not working",
|
|
"diagnose",
|
|
"troubleshoot",
|
|
"investigate this error",
|
|
],
|
|
"analyze": [
|
|
"analyze",
|
|
"examine",
|
|
"look at",
|
|
"check",
|
|
"inspect",
|
|
"understand",
|
|
"analyze file",
|
|
"analyze these files",
|
|
],
|
|
}
|