Skip to content

Add cached input prices for 4 Gemini models (refs #45) - #68

Open
xyzs996 wants to merge 1 commit into
simonw:mainfrom
xyzs996:google-cached-input
Open

xyzs996 wants to merge 1 commit into
simonw:mainfrom
xyzs996:google-cached-input

Conversation

@xyzs996

@xyzs996 xyzs996 commented Aug 22, 2026

Copy link
Copy Markdown

Refs #45. Fills in input_cached for 4 Gemini models.

Source: the Standard-tier Context caching column of https://ai.google.dev/gemini-api/docs/pricing, read 2026-08-22. Where the page prices audio separately I took the text/image/video figure, which is what input in this dataset already tracks.

id input input_cached page says
gemini-3-flash-preview 0.5 0.05 "$0.05 (text / image / video)", "$0.10 (audio)"
gemini-3-1-pro-preview 2 0.2 "$0.20, prompts <= 200k tokens"
gemini-3-1-pro-preview-200k 4 0.4 "$0.40, prompts > 200k"
gemini-2.0-flash 0.1 0.025 "$0.025 / 1,000,000 tokens (text/image/video)"

Deliberately still null:

  • gemini-2.0-flash-lite — the page says context caching is "Not available" for it. The null there is correct, not missing.
  • gemini-3-pro-preview / -200k, gemini-2.5-pro-preview-03-25 / -200k, and the five gemini-1.5-* entries — none of these appear on the current pricing page under those names, so there's nothing live to quote. I'd rather leave a hole than infer one.

I also checked gemini-3.6-flash and gemini-3.7-flash against the page and the two-entry price_history split you already have ($0.75/$3.75/$0.075 to 2027-01-01, then $1.50/$7.50/$0.15) matches it exactly, including the caching figure. Nothing to do there — noting it so you know it was verified rather than skipped.

python3 scripts/build.py runs clean.

Companion to #67, which does the same for data/anthropic.json. Same reason: for coding-agent workloads input_cached is the field that decides the answer — one measurement over 8.04B tokens put the mix at 95.6% cache reads, so the price that dominates the bill is the one that's null here.

Refs simonw#45. Values taken verbatim from the Standard-tier "Context caching"
column of https://ai.google.dev/gemini-api/docs/pricing (read 2026-08-22),
using the text/image/video figure where the page prices audio separately.

This branch has not been deployed

No deployments
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