feat(pricing): gemini-embedding-2 GA cost map, blog, and test#26391
feat(pricing): gemini-embedding-2 GA cost map, blog, and test#26391Sameerlite wants to merge 2 commits intolitellm_internal_stagingfrom
Conversation
- Add model_prices entries for gemini-embedding-2 (Gemini + Vertex paths) - Add docs blog gemini_embedding_2_ga with LiteLLM proxy curl examples - Add test_gemini_embedding_2_ga_in_cost_map in test_utils Made-with: Cursor
Low: No security issues foundThis PR adds pricing/cost-map entries for a new Gemini embedding model, a blog post documenting the feature, and a test verifying the cost map entries. All changes are to documentation, static JSON configuration data, and tests — no runtime code is modified. Status: 0 open Posted by Veria AI · 2026-04-24T06:28:48.450Z |
Greptile SummaryThis PR registers the GA release of Prior review concerns are addressed: the bare-key Confidence Score: 5/5Safe to merge — all three cost map entries are internally consistent and correct, prior concerns are resolved. No P0 or P1 issues found. Both previously flagged concerns (missing supports_multimodal on bare key, uses_embed_content consistency) are addressed in this PR. The test correctly validates all pricing and routing fields without making real network calls. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds three GA entries for gemini-embedding-2 (bare key, vertex_ai/, gemini/) with consistent pricing fields and correct uses_embed_content/supports_multimodal flags. |
| litellm/model_prices_and_context_window_backup.json | Backup JSON updated identically to the primary; all three GA entries are consistent with the primary file. |
| tests/test_litellm/test_utils.py | New test reads JSON from filesystem (no network calls) and validates pricing fields and routing flags for all three GA entries. |
| docs/my-website/blog/gemini_embedding_2_ga/index.md | New blog post documenting GA model name, proxy config, and SDK usage examples; no code changes. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["embedding(model=...)"] --> B{Parse provider}
B -->|"gemini/gemini-embedding-2"| C["Gemini API path\n(generativelanguage.googleapis.com)"]
B -->|"vertex_ai/gemini-embedding-2"| D["Vertex AI path"]
B -->|"gemini-embedding-2 (bare key)"| E["vertex_ai-embedding-models path"]
D --> F{uses_embed_content?}
E --> F
F -->|true| G["embedContent endpoint\n(main.py:5246)"]
F -->|false| H["predict endpoint"]
C --> I["Gemini embedContent\n(no flag check needed)"]
Reviews (2): Last reviewed commit: "Fix greptile reviews" | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
model_prices_and_context_window.jsonand backup for Gemini and Vertex-style keys./v1/embeddingscurl examples.test_gemini_embedding_2_ga_in_cost_mapto lock multimodal unit pricing fields.Test plan