fix: Switch Outreach to stable gemini-1.5-flash to fix 400 Bad Request

This commit is contained in:
2025-12-29 15:08:18 +00:00
parent 7f6fbb8246
commit 3eaa5e1daa

View File

@@ -552,8 +552,8 @@ def generate_outreach_campaign(company_data_json, knowledge_base_content, refere
logger.info(f"--- STARTING OUTREACH GENERATION FOR: {company_name} (Role: {specific_role if specific_role else 'Top 5'}) ---")
api_key = load_gemini_api_key()
# Use gemini-2.5-flash for SPEED in outreach generation
GEMINI_API_URL = f"https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent?key={api_key}"
# Switch to stable, super-fast gemini-1.5-flash to prevent timeouts
GEMINI_API_URL = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key={api_key}"
if specific_role:
# --- MODE B: SINGLE ROLE GENERATION ---