Skip to content

An/add gemini embedding 2#1752

Open
amiamaya wants to merge 2 commits into
anomalyco:devfrom
amiamaya:an/add-gemini-embedding-2
Open

An/add gemini embedding 2#1752
amiamaya wants to merge 2 commits into
anomalyco:devfrom
amiamaya:an/add-gemini-embedding-2

Conversation

@amiamaya
Copy link
Copy Markdown

@amiamaya amiamaya commented May 11, 2026

Summary

Adds Google's new multimodal embedding model gemini-embedding-2 and extends the cost schema with input_image / input_video fields so per-modality input pricing can be represented.

Changes

New model

  • providers/google/models/gemini-embedding-2.toml — Google's first multimodal embedding model. Maps text, images, video, audio, and PDFs into a unified 3072-dim embedding space.
    • Pricing (per 1M tokens): text $0.20, image $0.45, audio $6.50, video $12.00
    • Context: 8,192 input tokens, 3,072 output dimensions
    • Modalities: text, image, video, audio, pdf → text
  • providers/vercel/models/google/gemini-embedding-2.toml — wrapper using [extends] from the canonical Google entry.

Schema

  • packages/core/src/schema.ts — added optional cost.input_image and cost.input_video fields to the Cost schema, mirroring the existing input_audio pattern.
  • README.md — documented the new fields and added them to the example.

Web rendering

  • packages/web/src/render.tsx — added two new sortable columns: Image Input Cost and Video Input Cost (placed after Audio Output Cost).
  • packages/web/src/index.css — updated nth-child selectors to include the new cost columns in the dark-text/mono-font rules, and shifted the Weights-column reference from col 18 → col 24.

Source

Pricing and capabilities sourced from:

Notes

  • Google publishes image/video pricing in both per-token and per-unit forms ($0.00012/image, $0.00079/frame). Only the per-token rates are encoded since the Cost schema is token-based.
  • Batch tier pricing is not available for this model yet.
  • Existing gemini-embedding-001 files in wrapper provider dirs were left as-is (full duplicates rather than extends) to keep this PR scoped.

@amiamaya amiamaya force-pushed the an/add-gemini-embedding-2 branch from e2be88e to 70b6f68 Compare May 13, 2026 16:37
@amiamaya amiamaya force-pushed the an/add-gemini-embedding-2 branch from 70b6f68 to 7d4620b Compare May 13, 2026 16:44
@vladknysh
Copy link
Copy Markdown

Any ETA on this?

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