Skip to content

update gemini embedding model cost metrics#1010

Merged
ekeith (evanmkeith) merged 1 commit into
mainfrom
07-22-add-gemini-embedding-cost-metrics
Jul 23, 2026
Merged

update gemini embedding model cost metrics#1010
ekeith (evanmkeith) merged 1 commit into
mainfrom
07-22-add-gemini-embedding-cost-metrics

Conversation

@evanmkeith

Copy link
Copy Markdown
Contributor

Add cost metrics to Gemini embedding models

Adds input_cost_per_mil_tokens and output_cost_per_mil_tokens to the Gemini embedding models in model_list.json, covering both the Gemini API entries and the Vertex (publishers/google/models/...) entries:

Model Input ($/1M tokens) Output ($/1M tokens)
gemini-embedding-001 0.15 0
gemini-embedding-2 0.20 0

Pricing verified against the official Gemini API pricing page. Embedding models have no billed output tokens, so output cost is set to 0.

Note: gemini-embedding-2 is multimodal with per-modality input pricing (text $0.20/1M, image $0.45/1M, audio $6.50/1M, video $12.00/1M). The schema only supports a single input cost, so these entries reflect the text rate; non-text embedding inputs will be under-costed until per-modality cost fields exist.

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ai-proxy Ready Ready Preview, Comment Jul 22, 2026 4:46pm

Request Review

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

Copy link
Copy Markdown

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: 7d40e1f4dd

ℹ️ 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".

"format": "google",
"flavor": "embedding",
"multimodal": true,
"input_cost_per_mil_tokens": 0.2,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid using the text rate for multimodal embeddings

For gemini-embedding-2 this flat $0.20/M rate only matches text inputs, while the same entry is still marked multimodal and Google's pricing page lists higher image/audio/video input rates (https://ai.google.dev/gemini-api/docs/pricing#gemini-embedding-2). Because the schema exposes only one input_cost_per_mil_tokens value and billing/usage records aggregate input tokens, any image, audio, video, or PDF embedding request routed through this model will be costed as text instead of the modality-specific rate, under-reporting cost for those production requests; consider omitting this cost until modality-aware pricing is represented or restricting it to text-only entries.

Useful? React with 👍 / 👎.

@evanmkeith
ekeith (evanmkeith) merged commit 9e1d428 into main Jul 23, 2026
8 checks passed
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.

2 participants