Commit 702d035cf70a

Vincent Demeester <vincent@sbr.pm>
2026-01-14 20:47:57
fix(xmpp-research-bot): use global endpoint for Gemini 3 models
Gemini 3 Flash and Gemini 3 Pro models are only available on the global Vertex AI endpoint, not regional endpoints like us-east5. Changed the Gemini client initialization to use location='global' instead of the regional location parameter. Claude models continue to use the regional endpoint (us-east5) which works fine. This fixes the 404 error: "Publisher Model projects/.../models/gemini-3-flash-preview not found" References: - https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-flash - https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-pro Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 648903a
Changed files (1)
modules
xmpp-research-bot
modules/xmpp-research-bot/bot.py
@@ -67,15 +67,16 @@ class ResearchBot(slixmpp.ClientXMPP):
         self.anthropic_client = AnthropicVertex(project_id=project_id, region=region)
 
         # Initialize Gemini client if available
+        # Note: Gemini 3 models require the global endpoint
         self.gemini_client = None
         if GEMINI_AVAILABLE:
             try:
                 self.gemini_client = genai.Client(
                     vertexai=True,
                     project=project_id,
-                    location=region
+                    location='global'  # Gemini 3 models only available on global endpoint
                 )
-                log.info("Gemini client initialized successfully")
+                log.info("Gemini client initialized successfully (global endpoint)")
             except Exception as e:
                 log.warning(f"Failed to initialize Gemini client: {e}")