From 6c6f8054d2f7146f02f7274958902609a42d7372 Mon Sep 17 00:00:00 2001 From: Maciej Pienczyn Date: Sat, 7 Mar 2026 20:10:12 +0100 Subject: [PATCH] chore: remove deprecated google-generativeai SDK and gemini-2.0-flash model - Remove google-generativeai==0.8.6 from requirements.txt (no longer imported) - Remove gemini-2.0-flash alias and pricing (deprecated March 31) - Update test evaluator to use 3-flash instead of flash-2.0 Co-Authored-By: Claude Opus 4.6 --- gemini_service.py | 2 -- requirements.txt | 1 - tests/ai_quality_evaluator.py | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/gemini_service.py b/gemini_service.py index 7278ff2..39b4884 100644 --- a/gemini_service.py +++ b/gemini_service.py @@ -41,7 +41,6 @@ GEMINI_MODELS = { 'flash': 'gemini-2.5-flash', # Balanced cost/quality 'flash-lite': 'gemini-2.5-flash-lite', # Ultra cheap - $0.10/$0.40 per 1M tokens 'pro': 'gemini-2.5-pro', # High quality 2.5 gen - 'flash-2.0': 'gemini-2.0-flash', # Second generation (wycofywany 31.03.2026) '3-flash': 'gemini-3-flash-preview', # Gemini 3 Flash - thinking mode '3-pro': 'gemini-3.1-pro-preview', # Gemini 3.1 Pro (alias zachowany dla kompatybilności) '3.1-pro': 'gemini-3.1-pro-preview', # Gemini 3.1 Pro - najlepszy reasoning @@ -77,7 +76,6 @@ GEMINI_PRICING = { 'gemini-2.5-flash': {'input': 0.30, 'output': 2.50, 'thinking': 0}, 'gemini-2.5-flash-lite': {'input': 0.10, 'output': 0.40, 'thinking': 0}, 'gemini-2.5-pro': {'input': 1.25, 'output': 10.00, 'thinking': 0}, - 'gemini-2.0-flash': {'input': 0.10, 'output': 0.40, 'thinking': 0}, 'gemini-3-flash-preview': {'input': 0.50, 'output': 3.00, 'thinking': 1.00}, # Paid tier 'gemini-3.1-pro-preview': {'input': 2.00, 'output': 12.00, 'thinking': 4.00}, # Paid tier 'gemini-3.1-flash-lite-preview': {'input': 0.25, 'output': 1.50, 'thinking': 0}, # Paid tier diff --git a/requirements.txt b/requirements.txt index 1d3e333..4ee833f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,6 @@ psycopg2-binary==2.9.11 # Google Gemini AI google-genai==1.61.0 -google-generativeai==0.8.6 # Google Maps/Places API googlemaps==4.10.0 diff --git a/tests/ai_quality_evaluator.py b/tests/ai_quality_evaluator.py index 10a56ec..d269b33 100644 --- a/tests/ai_quality_evaluator.py +++ b/tests/ai_quality_evaluator.py @@ -76,7 +76,7 @@ class AIQualityEvaluator: self.db = SessionLocal() # Initialize Gemini service - gemini_service.init_gemini_service(model='flash-2.0') + gemini_service.init_gemini_service(model='3-flash') # Load all company names for matching self.all_companies = self._load_company_names()