Skip to content

fix: add Google models gemini-3.1-flash-image-preview +3 more#503

Merged
Caitlin Pinn (cpinn) merged 3 commits intomainfrom
chore/autofix-issue-464
May 4, 2026
Merged

fix: add Google models gemini-3.1-flash-image-preview +3 more#503
Caitlin Pinn (cpinn) merged 3 commits intomainfrom
chore/autofix-issue-464

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 29, 2026

fix: add Google models gemini-3.1-flash-image-preview +3 more

Closes #464

Source issue: #464

Summary

Field Value
Provider google
Primary model gemini-3.1-flash-image-preview
Changed models gemini-3.1-flash-image-preview
gemini-2.5-flash-image
gemini-embedding-2-preview
gemini-2.5-computer-use-preview-10-2025
Added models gemini-3.1-flash-image-preview
gemini-2.5-flash-image
gemini-embedding-2-preview
gemini-2.5-computer-use-preview-10-2025
Updated models None
Verification sources 1
2
3
4
5
6
7
8

Verified metadata

Model Display name Parent Providers Format Flavor Token limits Pricing Lifecycle
gemini-3.1-flash-image-preview Gemini 3.1 Flash Image Preview google, vertex google chat input=131072, output=32768 in/out=0.5/3 per 1M multimodal=true
gemini-2.5-flash-image Gemini 2.5 Flash Image google, vertex google chat input=32768, output=32768 in/out=0.3/2.5 per 1M multimodal=true
gemini-embedding-2-preview Gemini Embedding 2 Preview google, vertex google embedding input=8192, output=n/a in/out=0.2/? per 1M multimodal=true
gemini-2.5-computer-use-preview-10-2025 Gemini 2.5 Computer Use Preview (10-2025) google, vertex google chat input=128000, output=64000 in/out=1.25/10 per 1M multimodal=true

Verification notes

Verification

Sources and fields verified

Source URL Models verified Fields verified
https://ai.google.dev/gemini-api/docs/pricing All four models input_cost_per_mil_tokens, output_cost_per_mil_tokens
https://cloud.google.com/vertex-ai/generative-ai/pricing gemini-3.1-flash-image-preview, gemini-2.5-flash-image, gemini-2.5-computer-use-preview-10-2025 input_cost_per_mil_tokens, output_cost_per_mil_tokens (per-million-token rates confirmed)
https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-1-flash-image gemini-3.1-flash-image-preview max_input_tokens (131072), max_output_tokens (32768), supported_regions (global), Vertex availability
https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash-image gemini-2.5-flash-image max_input_tokens (32768), max_output_tokens (32768), supported_regions (global + regional), Vertex availability (GA)
https://ai.google.dev/gemini-api/docs/models/gemini-embedding-2-preview gemini-embedding-2-preview max_input_tokens (8192), multimodal input support, model ID confirmed as gemini-embedding-2-preview
https://ai.google.dev/gemini-api/docs/models/gemini-2.5-computer-use-preview-10-2025 gemini-2.5-computer-use-preview-10-2025 max_input_tokens (128000), max_output_tokens (64000), multimodal (image input)
https://ai.google.dev/gemini-api/docs/embeddings gemini-embedding-2-preview Available through both Gemini API and Vertex AI

sync_models (LiteLLM) cross-check

All four models (gemini-3.1-flash-image-preview, gemini-2.5-flash-image, gemini-embedding-2-preview, gemini-2.5-computer-use-preview-10-2025) are entirely absent from the LiteLLM model_prices_and_context_window_backup.json catalog. Therefore every proposed field deviates from sync_models (which has no data). All values are sourced from official Google documentation as listed above. No sync_models values exist to compare against.

Per-model field notes

gemini-3.1-flash-image-preview

  • format: "google" — inferred from provider (Google), consistent with all existing Gemini entries
  • flavor: "chat" — matches existing gemini-3-pro-image-preview (image gen models use chat flavor)
  • multimodal: true — accepts text and image inputs per Vertex docs
  • input_cost_per_mil_tokens: 0.5 — Google AI pricing page and Vertex pricing page both confirm $0.50/M
  • output_cost_per_mil_tokens: 3 — text output pricing; image output is $60/M (separate billing dimension not expressible in schema)
  • max_input_tokens: 131072 — Vertex AI model page
  • max_output_tokens: 32768 — Vertex AI model page
  • supported_regions: ["global"] — Vertex AI model page
  • available_providers: ["google", "vertex"] — confirmed on both Google AI docs and Vertex AI model page
  • displayName: "Gemini 3.1 Flash Image Preview" — follows style of existing gemini-3-pro-image-preview ("Gemini 3 Pro Image Preview")
  • Cache pricing: not published for this model on either pricing page; omitted
  • Parent: none — standalone preview model, no base alias exists in catalog

gemini-2.5-flash-image

  • format: "google"
  • flavor: "chat" — matches existing image generation model pattern
  • multimodal: true — accepts text and image inputs per Vertex docs
  • input_cost_per_mil_tokens: 0.3 — confirmed on both pricing pages
  • output_cost_per_mil_tokens: 2.5 — text output pricing per Vertex pricing page; image output is $30/M (separate billing dimension)
  • max_input_tokens: 32768 — Vertex AI model page
  • max_output_tokens: 32768 — Vertex AI model page
  • supported_regions: ["global"] — Vertex AI model page lists global plus regional endpoints
  • available_providers: ["google", "vertex"] — Vertex docs confirm GA availability
  • displayName: "Gemini 2.5 Flash Image"
  • Cache pricing: not published; omitted
  • Parent: none — standalone image model, not a snapshot of gemini-2.5-flash

gemini-embedding-2-preview

  • format: "google"
  • flavor: "embedding" — this is an embedding model; ModelFlavors includes "embedding"
  • multimodal: true — accepts text, image, video, audio, and PDF inputs per dedicated model docs
  • input_cost_per_mil_tokens: 0.2 — text input pricing from Google AI pricing page; image/audio/video input have different rates ($0.45, $6.50, $12.00/M respectively) but schema only supports a single input rate
  • output_cost_per_mil_tokens: omitted — embedding models produce vectors, not tokens
  • max_input_tokens: 8192 — dedicated model docs page
  • max_output_tokens: omitted — not applicable for embedding models
  • available_providers: ["google", "vertex"] — embeddings docs explicitly state "Available through Gemini API or Vertex AI"
  • displayName: "Gemini Embedding 2 Preview"
  • Note: The embeddings overview page at ai.google.dev/gemini-api/docs/embeddings references the model as "gemini-embedding-2" (without "-preview"), while the dedicated model page uses "gemini-embedding-2-preview". The issue names the model as gemini-embedding-2-preview matching the dedicated docs page URL.
  • Cache pricing: not applicable for embedding models
  • Parent: none

gemini-2.5-computer-use-preview-10-2025

  • format: "google"
  • flavor: "chat"
  • multimodal: true — accepts image inputs (screenshots) per model docs
  • input_cost_per_mil_tokens: 1.25 — confirmed on both Google AI and Vertex pricing pages; matches Gemini 2.5 Pro standard-tier pricing. Note: Google also lists a higher rate ($2.50/M) for prompts >200k tokens, but the schema only supports a single rate
  • output_cost_per_mil_tokens: 10 — confirmed on both pricing pages; matches Gemini 2.5 Pro. Higher rate ($15/M) for prompts >200k tokens not expressible in schema
  • max_input_tokens: 128000 — dedicated model docs page
  • max_output_tokens: 64000 — dedicated model docs page
  • available_providers: ["google", "vertex"] — listed on Vertex AI pricing page and available in Vertex model garden
  • displayName: "Gemini 2.5 Computer Use Preview (10-2025)"
  • Cache pricing: not published for this model; omitted
  • Parent: none — standalone preview model; note that Google docs mention newer Gemini 3 models include built-in computer use capabilities

Fields not published or not applicable

  • Cache read/write pricing: Not published for any of these four models on either pricing page
  • Reasoning / reasoning_budget: Not applicable for image generation or embedding models; not documented for computer use model
  • Deprecation dates: None published for any of these models
  • Parent relationships: None — all are standalone models without documented base aliases in the catalog

sync_models vs proposed update

sync_models cross-check found differences. Official provider verification was used for the applied values, and sync_models discrepancies are listed below for review.

Model Field Proposed update sync_models sync_models source models
gemini-3.1-flash-image-preview max_input_tokens 131072 65536 gemini/gemini-3.1-flash-image-preview, gemini-3.1-flash-image-preview
gemini-3.1-flash-image-preview input_cost_per_mil_tokens 0.5 0.25 gemini/gemini-3.1-flash-image-preview, gemini-3.1-flash-image-preview
gemini-3.1-flash-image-preview output_cost_per_mil_tokens 3 1.5 gemini/gemini-3.1-flash-image-preview, gemini-3.1-flash-image-preview
gemini-2.5-flash-image input_cache_read_cost_per_mil_tokens n/a 0.03 gemini/gemini-2.5-flash-image, gemini-2.5-flash-image
gemini-embedding-2-preview catalog entry present missing None

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-proxy Ready Ready Preview, Comment May 4, 2026 9:29pm

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98dc320c91

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

Comment thread packages/proxy/schema/model_list.json Outdated
Comment on lines +6486 to +6488
"format": "google",
"flavor": "embedding",
"multimodal": true,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove unsupported Google embedding model entry

Do not advertise gemini-embedding-2-preview as a built-in model yet: with format: "google" and flavor: "embedding", /embeddings requests for this model are routed through the Google fetch path, but that path only implements chat-style handling (fetchGoogleChatCompletions expects messages and calls .find on it). Embedding payloads provide input instead, so requests to this newly added model will fail at runtime rather than producing embeddings.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 1, 2026

Proxy model verification

Verification completed successfully.

Passed: 2
Failed: 0

Tested models

  • gemini-3.1-flash-image-preview
  • gemini-2.5-flash-image

Passed models

  • gemini-3.1-flash-image-preview
  • gemini-2.5-flash-image

Failed models

  • None

Caitlin Pinn (cpinn) added a commit that referenced this pull request May 4, 2026
Fix a couple of issues with the new job that will attempt to verify
models exist

- find the vercel bot comment correctly
- remove unnecessary local model test
- fix permissions for posting comment

Sample verification that has failed because of missing credentials:
#512 (comment)

Update made a few changes as credentials could not be found. New
verification that actually did end up failing the models I expected:
#503 (comment)
@cpinn Caitlin Pinn (cpinn) merged commit 6f22bbf into main May 4, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOT ISSUE] Missing Gemini image generation and embedding models with published pricing

1 participant