NAAMSE icon indicating copy to clipboard operation
NAAMSE copied to clipboard

Google AI Studio free tier quota blocks evaluation — support for Vertex AI or paid quota?

Open ironshell-ui opened this issue 8 months ago • 2 comments

Problem

When running NAAMSE evaluation, the green agent hits Google AI Studio free tier quota limits:

quota_metric: "generativelanguage.googleapis.com/generate_content_free_tier_requests"
quota_id: "GenerateRequestsPerDayPerProjectPerModel-FreeTier"
quota_value: 20

This happens even with a Google Cloud billing account with $300 trial credits active. The issue is that generativelanguage.googleapis.com (AI Studio endpoint) enforces free tier quotas separately from billing — paid usage requires the Vertex AI endpoint (aiplatform.googleapis.com).

The NAAMSE agent uses langchain_google_genai.ChatGoogleGenerativeAI which routes to AI Studio, not Vertex AI.

Impact

Purple agent participants cannot complete the evaluation if they've exhausted their daily free tier quota (1,500 requests/day across all keys in the same project).

Possible Solutions

  1. Support GOOGLE_GENAI_USE_VERTEXAI=True — langchain_google_genai supports this env var to route through Vertex AI instead of AI Studio
  2. Accept GOOGLE_APPLICATION_CREDENTIALS — for Vertex AI service account auth
  3. Reduce API calls — the current 7 iterations × 4 mutations with 4 parallel workers burns through quota fast
  4. Support MUTATION_ENGINE_API_KEY as a separate key — already in the code but not documented

Environment

  • NAAMSE image: ghcr.io/hashiru-ai/naamse-naamse-green-agent:latest
  • Models used: gemini-2.0-flash (judge), gemini-2.5-flash (mutation)
  • gemini-2.5-flash works with billing, gemini-2.0-flash hits free tier limit

ironshell-ui avatar Mar 25 '26 15:03 ironshell-ui

fyi:

Caution: As of March 6, 2026, gemini-2.0-flash-001 and gemini-2.0-flash-lite-001 are only available for existing customers. This includes both model serving and Provisioned Throughput. New projects should use gemini-2.5-flash, gemini-2.5-flash-lite, or more recent releases.

ref: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-0-flash

helloparthshah avatar Apr 11 '26 05:04 helloparthshah

Thanks for the detailed write-up and for highlighting this!

We've just pushed a few updates to main that should resolve these quota limit issues and unblock the evaluation. Specifically:

  1. Vertex AI Support: We've merged support for GOOGLE_GENAI_USE_VERTEXAI=true! You can now authenticate with Vertex AI service accounts (GOOGLE_APPLICATION_CREDENTIALS) and seamlessly route your requests through the Vertex AI endpoint instead of AI Studio.
  2. Dedicated Engine API Keys: We've fully documented and added support for configuring separate API keys for the different engines. You can now set MUTATION_ENGINE_API_KEY (along with dedicated keys for the behavioral engines) to help distribute the quota load.
  3. Model Configuration Overrides: You also now have full control over the models being utilized. You can explicitly override the judge configuration to use gemini-2.5-flash or any other model of your choice to bypass the free-tier strict caps associated with gemini-2.0-flash.

Please use the latest image (the updated README.md and .env.example include these new configuration variables). Let us know if this fully unblocks you!

helloparthshah avatar Apr 11 '26 06:04 helloparthshah