fix(cost-map): give the Gemini 4 Argon rows the shared Gemini 3 search free tier (#50959)

This commit is contained in:
Kerry Lu 2026-11-10 10:30:00 -08:00 • committed by GitHub
parent e6db6206d1
commit 43a4b465e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 4 deletions

View file

@ -78910,6 +78910,7 @@
"prompt_cache_min_tokens": 4096.0,
"rpm": 2000.0,
"search_context_cost_per_query": {"search_context_size_low":0.014,"search_context_size_medium":0.014,"search_context_size_high":0.014},
"search_free_requests": {"count": 5000, "period": "month", "shared_group": "gemini-3"},
"source": "https://ai.google.dev/gemini-api/docs/pricing",
"supported_endpoints": [
"/v1/chat/completions",
@ -78970,6 +78971,7 @@
"prompt_cache_min_tokens": 6144.0,
"regional_endpoint_uplift_multiplier": 1.1,
"search_context_cost_per_query": {"search_context_size_low":0.014,"search_context_size_medium":0.014,"search_context_size_high":0.014},
"search_free_requests": {"count": 5000, "period": "month", "shared_group": "gemini-3"},
"source": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
@ -79029,6 +79031,7 @@
"prompt_cache_min_tokens": 6144.0,
"regional_endpoint_uplift_multiplier": 1.1,
"search_context_cost_per_query": {"search_context_size_low":0.014,"search_context_size_medium":0.014,"search_context_size_high":0.014},
"search_free_requests": {"count": 5000, "period": "month", "shared_group": "gemini-3"},
"source": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",

View file

@ -78910,6 +78910,7 @@
"prompt_cache_min_tokens": 4096.0,
"rpm": 2000.0,
"search_context_cost_per_query": {"search_context_size_low":0.014,"search_context_size_medium":0.014,"search_context_size_high":0.014},
"search_free_requests": {"count": 5000, "period": "month", "shared_group": "gemini-3"},
"source": "https://ai.google.dev/gemini-api/docs/pricing",
"supported_endpoints": [
"/v1/chat/completions",
@ -78970,6 +78971,7 @@
"prompt_cache_min_tokens": 6144.0,
"regional_endpoint_uplift_multiplier": 1.1,
"search_context_cost_per_query": {"search_context_size_low":0.014,"search_context_size_medium":0.014,"search_context_size_high":0.014},
"search_free_requests": {"count": 5000, "period": "month", "shared_group": "gemini-3"},
"source": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
@ -79029,6 +79031,7 @@
"prompt_cache_min_tokens": 6144.0,
"regional_endpoint_uplift_multiplier": 1.1,
"search_context_cost_per_query": {"search_context_size_low":0.014,"search_context_size_medium":0.014,"search_context_size_high":0.014},
"search_free_requests": {"count": 5000, "period": "month", "shared_group": "gemini-3"},
"source": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",

View file

@ -958,23 +958,26 @@ def test_gemini_4_argon_google_rows_carry_supports_continuation_in_both_cost_map
assert _supports_continuation_rows(BACKUP_PRICES_PATH) == main_rows
def test_gemini_4_carbon_rows_share_the_gemini_3_search_allowance_in_both_cost_map_copies() -> None:
def test_gemini_4_rows_share_the_gemini_3_search_allowance_in_both_cost_map_copies() -> None:
main_rows: Final = _search_free_requests_rows(PRICES_PATH)
# 5,000 free grounding requests per month shared across Gemini 3 and newer:
# https://ai.google.dev/gemini-api/docs/pricing#gemini-4-carbon and
# https://cloud.google.com/vertex-ai/generative-ai/pricing (2026-11-10)
carbon_rows: Final = {
gemini_4_rows: Final = {
"gemini/gemini-4-argon",
"vertex_ai/gemini-4-argon",
"vertex_ai/gemini-4-argon-cyber-permissive",
"gemini/gemini-4-carbon",
"vertex_ai/gemini-4-carbon",
"vertex_ai/gemini-4-carbon-cyber-permissive",
}
assert carbon_rows <= main_rows.keys(), sorted(main_rows)
assert gemini_4_rows <= main_rows.keys(), sorted(main_rows)
gemini_3_allowances: Final = {
json.dumps(main_rows[key]["search_free_requests"], sort_keys=True)
for key in ("gemini/gemini-3.8-flash", "vertex_ai/gemini-3.8-flash")
}
assert {
json.dumps(main_rows[key]["search_free_requests"], sort_keys=True) for key in carbon_rows
json.dumps(main_rows[key]["search_free_requests"], sort_keys=True) for key in gemini_4_rows
} == gemini_3_allowances
assert _search_free_requests_rows(BACKUP_PRICES_PATH) == main_rows