[FIX] Update Gemini embedding default model to gemini-embedding-001#1924
[FIX] Update Gemini embedding default model to gemini-embedding-001#1924jaseemjaskp merged 3 commits intomainfrom
Conversation
The previous default `gemini/text-embedding-004` is legacy and no longer a valid model on Google AI Studio. Update the default to `gemini-embedding-001` (stable GA, text-only) and document `gemini-embedding-2-preview` as the multimodal option. Drop the `gemini/` prefix from the user-facing default since validation adds it automatically before passing to litellm.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Summary by CodeRabbit
WalkthroughDefault Gemini embedding model identifier changed from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| unstract/sdk1/src/unstract/sdk1/adapters/base1.py | Error message example updated from gemini/text-embedding-004 to gemini-embedding-001 (user-facing, prefix-free), consistent with how the schema default is now presented. |
| unstract/sdk1/src/unstract/sdk1/adapters/embedding1/static/gemini.json | Default updated to gemini-embedding-001; description retains the prefix-auto-prepend note and adds mention of gemini-embedding-2-preview for multimodal use. |
| unstract/sdk1/tests/test_gemini_embedding.py | All 27 test fixtures and assertions consistently updated from text-embedding-004 to gemini-embedding-001; prefix-prepend and idempotency behaviour unchanged. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User provides model name] --> B{starts with gemini/?}
B -- No --> C[Prepend 'gemini/' prefix]
B -- Yes --> D[Use as-is]
C --> E[Pass to litellm]
D --> E
subgraph Default Value Change
F["OLD default: gemini/text-embedding-004\n(legacy, no longer served)"] -->|This PR| G["NEW default: gemini-embedding-001\n(stable GA)"]
end
Reviews (3): Last reviewed commit: "Update unstract/sdk1/src/unstract/sdk1/a..." | Re-trigger Greptile
…ini.json Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
|
Test ResultsSummary
Runner Tests - Full Report
SDK1 Tests - Full Report
|



What
gemini/text-embedding-004(legacy) togemini-embedding-001(current stable GA).gemini/prefix from the user-facing default; validation still prepends it before passing to litellm, so routing is unaffected.gemini-embedding-2-previewas the multimodal option.Why
text-embedding-004is no longer a valid/supported model on Google AI Studio, so existing adapter instances using the default would fail at embed time.gemini-embedding-001(stable, text-only) andgemini-embedding-2-preview(multimodal preview).gemini/provider prefix is an implementation detail of litellm routing, not something end users should type.How
unstract/sdk1/src/unstract/sdk1/adapters/embedding1/static/gemini.json: default + description updated.unstract/sdk1/src/unstract/sdk1/adapters/base1.py: example in thevalidate_modelerror message updated. Prefix auto-prepend logic unchanged.unstract/sdk1/tests/test_gemini_embedding.py: all assertions and fixture model names switched togemini-embedding-001.Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
text-embedding-004) continues to validate and route the same way.gemini/text-embedding-004stored — they should update their adapter model togemini-embedding-001since the legacy model is no longer served.Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
Dependencies Versions
Notes on Testing
uv run pytest tests/test_gemini_embedding.py -v— all 27 tests pass.Screenshots
Checklist
I have read and understood the Contribution Guidelines.