Skip to content

[google] Correct Gemini 3.1 Pro prices and declare context tiers - #1022

Closed
allenrchan wants to merge 2 commits into
Portkey-AI:mainfrom
allenrchan:fix/gemini-31-pro-pricing-20261106
Closed

allenrchan wants to merge 2 commits into
Portkey-AI:mainfrom
allenrchan:fix/gemini-31-pro-pricing-20261106

Conversation

@allenrchan

@allenrchan allenrchan commented Nov 6, 2026 •

Copy link
Copy Markdown

Google documents a 200,000-prompt-token boundary for Gemini 3.1 Pro Preview and the Custom Tools endpoint. The current 200k records mix hourly cache-storage pricing into cache-read tokens and retain the older search price; separate 128k aliases also contradict the documented boundary.

This corrects both families and makes their tier applicability explicit:

  • Keep the 200k pairs and remove their conflicting 128k pricing aliases.
  • Set cache reads to US$0.20/0.40 per million tokens (0.00002/0.00004 cents per token), and omit the unsupported separate cache-write token fee.
  • Set the existing search unit aliases to US$14 per thousand queries (1.4 cents per query).
  • Add canonical gemini-3.1-pro-preview and gemini-3.1-pro-preview-customtools entries using the existing custom_pricing.context_tier_map / default-region / execution-mode shape already used by OpenAI. Both Standard and Batch retain their exact source token prices. The lower tier includes 200,000 prompt tokens; the upper tier starts above that boundary.

The metadata addition preserves every existing record from the preceding correction commit. It lets consumers select the actual model and context explicitly rather than guessing a canonical identity from tier suffixes. The existing lower-tier base table and suffix records are retained consistently with current catalog conventions.

These are marginal rates. This does not add free-search quota allocation, per-query usage measurement, hourly cache-storage metering, or Flash audio-modality qualification.

Source: Google Gemini Developer API pricing, including its Custom Tools pricing note. Refreshed official-source comparison confirms all twelve Standard token/cache rates and both context bounds.

Validation: every pricing/general JSON parses; the complete duplicate-key check passes; exact decimal comparisons preserve Standard/Batch rates and all unrelated model data; git diff --check passes. No provider call was made. The personal fork's main is synchronized with upstream fc5ea5659737084a703ddac15b822071037dd3eb; this contribution is based on that same upstream revision.

@allenrchan allenrchan changed the title [google] Correct Gemini 3.1 Pro tier, cache and search prices [google] Correct Gemini 3.1 Pro prices and declare context tiers Nov 7, 2026
@allenrchan allenrchan closed this Nov 7, 2026
@allenrchan
allenrchan deleted the fix/gemini-31-pro-pricing-20261106 branch November 7, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant