chore: remove deprecated google-generativeai SDK and gemini-2.0-flash model
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

- 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 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-07 20:10:12 +01:00
parent 27484e1680
commit 6c6f8054d2
3 changed files with 1 additions and 4 deletions

View File

@ -41,7 +41,6 @@ GEMINI_MODELS = {
'flash': 'gemini-2.5-flash', # Balanced cost/quality 'flash': 'gemini-2.5-flash', # Balanced cost/quality
'flash-lite': 'gemini-2.5-flash-lite', # Ultra cheap - $0.10/$0.40 per 1M tokens '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 '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-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-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 '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': {'input': 0.30, 'output': 2.50, 'thinking': 0},
'gemini-2.5-flash-lite': {'input': 0.10, 'output': 0.40, '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.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-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-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 'gemini-3.1-flash-lite-preview': {'input': 0.25, 'output': 1.50, 'thinking': 0}, # Paid tier

View File

@ -19,7 +19,6 @@ psycopg2-binary==2.9.11
# Google Gemini AI # Google Gemini AI
google-genai==1.61.0 google-genai==1.61.0
google-generativeai==0.8.6
# Google Maps/Places API # Google Maps/Places API
googlemaps==4.10.0 googlemaps==4.10.0

View File

@ -76,7 +76,7 @@ class AIQualityEvaluator:
self.db = SessionLocal() self.db = SessionLocal()
# Initialize Gemini service # 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 # Load all company names for matching
self.all_companies = self._load_company_names() self.all_companies = self._load_company_names()