Skip to content

feat(pricing): add gemini-3-pro-image and gemini-3.1-flash-image GA model pricing - #29797

Closed
VANDRANKI wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
VANDRANKI:fix/add-gemini-3-pro-image-and-flash-image-pricing
Closed

VANDRANKI wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
VANDRANKI:fix/add-gemini-3-pro-image-and-flash-image-pricing

Conversation

@VANDRANKI

Copy link
Copy Markdown

Description

Adds pricing entries for the GA (non-preview) releases of two Gemini image generation models:

  • gemini-3-pro-image (and gemini/gemini-3-pro-image, vertex_ai/gemini-3-pro-image)
  • gemini-3.1-flash-image (and gemini/gemini-3.1-flash-image, vertex_ai/gemini-3.1-flash-image)

Fixes #29794

These models were promoted from preview but the GA model names were missing from model_prices_and_context_window.json, causing litellm.cost_calculator to return 0 or raise an exception for these models.

Pricing used

Pricing matches the corresponding preview models per Google's published rates:

Model Input $/token Output $/token Input $/image Output $/image
gemini-3-pro-image 2e-06 1.2e-05 0.0011 0.134
gemini-3.1-flash-image (vertex) 5e-07 3e-06 0.00056 0.0672
gemini/gemini-3.1-flash-image 2.5e-07 1.5e-06 - 0.045

Sources:

Type of change

  • Bug fix (adding missing pricing data)

Checklist

  • I have added pricing for all three provider prefixes (bare, gemini/, vertex_ai/)
  • Pricing values match the corresponding -preview models
  • New entries are positioned immediately before their -preview counterparts

…h-image GA models

Fixes BerriAI#29794

Adds pricing entries for the non-preview GA releases of:
- gemini-3-pro-image (bare, gemini/, vertex_ai/ prefixes)
- gemini-3.1-flash-image (bare, gemini/, vertex_ai/ prefixes)

Pricing matches the corresponding preview models per Google's published rates.
@greptile-apps

greptile-apps Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds GA (non-preview) pricing entries for gemini-3-pro-image and gemini-3.1-flash-image across three provider prefixes (bare, gemini/, vertex_ai/), mirroring the values already in their -preview counterparts. However, the entire ~40,000-line model_prices_and_context_window.json was also reformatted from 4-space to 2-space indentation, creating a ~2.7 MB diff that makes the actual 6-entry change unverifiable.

  • Whole-file reformat: 40,413 lines removed and 40,535 added due to a 4-space → 2-space indent change; the net content diff is only ~122 lines. This should be reverted so only the 6 new entries appear in the diff.
  • Pricing values: The new GA entries correctly mirror their -preview counterparts; spot-checked pricing matches Google's published rates.
  • Source URL: The vertex_ai/gemini-3-pro-image entry uses a non-existent docs.cloud.google.com hostname; it should point to cloud.google.com/vertex-ai/generative-ai/pricing#gemini-models.

Confidence Score: 3/5

The pricing data for the 6 new entries looks correct, but the whole-file reformat makes it impossible to confirm that no other data was silently altered during the change.

The new GA entries mirror their preview counterparts and spot-checked values match Google's published rates. However, the entire file was reformatted alongside the additions, so there is no practical way to audit whether any existing pricing values were accidentally changed.

model_prices_and_context_window.json — should be resubmitted with only the 6 new entries and no reformatting so the actual change can be reviewed.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds GA pricing entries for gemini-3-pro-image and gemini-3.1-flash-image across three provider prefixes, but unintentionally reformatted the entire ~40k-line file from 4-space to 2-space indentation, making the actual content changes unverifiable in the diff. The vertex_ai/gemini-3-pro-image entry also carries an incorrect source URL hostname.

Comments Outside Diff (2)

  1. model_prices_and_context_window.json, line 1 (link)

    P1 Global file reformat buries the actual changes

    The diff for this PR contains ~40,413 removed lines and ~40,535 added lines — essentially the entire 40 k-line file — because the indentation was changed from 4-space to 2-space throughout. The net content change (6 new model entries) is only ~122 lines. This makes it practically impossible to verify that only pricing entries were added and nothing else was modified. It also permanently corrupts git blame for every line in the file. Please revert the formatting change and submit only the 6 new entries with the surrounding context left untouched.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

  2. model_prices_and_context_window.json, line 33540-33554 (link)

    P2 The source URL uses docs.cloud.google.com as the hostname, which is not a valid Google Cloud domain (the real domain is cloud.google.com). The sibling entry vertex_ai/gemini-3.1-flash-image correctly links to https://cloud.google.com/vertex-ai/generative-ai/pricing#gemini-models.

Reviews (1): Last reviewed commit: "feat(pricing): add pricing for gemini-3-..." | Re-trigger Greptile

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level

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.

[Feature]: pricing for gemini-3-pro-image and gemini-3.1-flash-image

1 participant