You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Helper agents keep using the Gemini API key when Gemini should run on Vertex AI #227
When Gemini should run on Vertex AI, part of ARTEMIS still calls the Gemini Developer API with GOOGLE_API_KEY. Several helper agents build their own Gemini clients from the key instead of following the agent config:
the Flash step summarizer (get_google_llm always creates a google endpoint)
the explorer's native engine (genai.Client(api_key=...))
the object detector and the video analyzer (native client from the key)
With a free-tier key this shows up as 429 RESOURCE_EXHAUSTED (generate_content_free_tier_requests) from the step summarizer during Flash runs, plus 503s from the developer API at busy times, even though the main model could run on Vertex. There is no single setting that moves all Gemini traffic to Vertex.
Separately, the explicit vertexai provider (ChatVertexAI) fails on the second turn with Gemini 3 (#156); #186 addresses that.
Proposal: honour google-genai's own switch, GOOGLE_GENAI_USE_VERTEXAI=true. When set, every google endpoint is created as ChatGoogleGenerativeAI(vertexai=True, project=..., location=...) with Application Default Credentials, and the explorer and video analyzer use the LangChain path instead of their key-based native path. Project and location come from VERTEX_AI_PROJECT / GOOGLE_CLOUD_PROJECT and VERTEX_AI_LOCATION / GOOGLE_CLOUD_LOCATION (default global, where Gemini 3 is served). Because these calls go through google-genai, they keep the developer-API message conversion and avoid the part-order error from #156. I have a small PR for this.
Activity