Repository navigation
[google] Correct Gemini 3.1 Pro prices and declare context tiers - #1022
Closed
allenrchan wants to merge 2 commits into
Closed
allenrchan wants to merge 2 commits into
allenrchan wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
0.00002/0.00004cents per token), and omit the unsupported separate cache-write token fee.1.4cents per query).gemini-3.1-pro-previewandgemini-3.1-pro-preview-customtoolsentries using the existingcustom_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 --checkpasses. No provider call was made. The personal fork'smainis synchronized with upstreamfc5ea5659737084a703ddac15b822071037dd3eb; this contribution is based on that same upstream revision.