feat(memory): add gemini-embedding-2-preview support#42501
feat(memory): add gemini-embedding-2-preview support#42501gumadeiras merged 7 commits intoopenclaw:mainfrom
Conversation
- Add gemini-embedding-2-preview to supported embedding models - Support outputDimensionality (768/1536/3072, default 3072) for v2 models - Support taskType parameter for semantic retrieval optimization - Add multimodal part builders (buildInlineDataPart, buildFileDataPart) - Set 8192 token limit for gemini-embedding-2-preview - Maintain backward compatibility for gemini-embedding-001 (no new fields) - Add comprehensive test coverage (26 tests) Closes openclaw#42487
Greptile SummaryThis PR adds Key findings:
Confidence Score: 2/5
Last reviewed commit: 38ddfb3 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b21f452df8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bf605cd4e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f829279 to
38ddfb3
Compare
|
@greptile-apps review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38ddfb3c98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ae7eeee37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
I think I fixed all of the codex merging mess. Let me know if I missed anything. This PR will greatly improve embeddings. |
|
This doesn't appear to actually wire multimodal inputs into OpenClaw’s memory pipeline: it just adds some adds some multimodal-shaped helper types and builders in src/memory/embeddings-gemini.ts. Is this intentional? You might want to specify that this is text only without further work. |
# Conflicts: # CHANGELOG.md
8ae7eee to
c57b1f8
Compare
|
all supported memory files are text for now so that is intentional; adding support for non text (.md) is a bigger change and coming in a follow up PR |
|
Merged via squash.
Thanks @BillChirico! |
Merged via squash. Prepared head SHA: c57b1f8 Co-authored-by: BillChirico <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: c57b1f8 Co-authored-by: BillChirico <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: c57b1f8 Co-authored-by: BillChirico <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: c57b1f8 Co-authored-by: BillChirico <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: c57b1f8 Co-authored-by: BillChirico <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras (cherry picked from commit 60aed95)
Summary
Adds support for
gemini-embedding-2-previewas an embedding model option alongside the existinggemini-embedding-001default.Changes
src/memory/embedding-model-limits.ts: Add 8192 token limit forgemini-embedding-2-previewsrc/memory/embeddings-gemini.ts:outputDimensionalitysupport (768/1536/3072, default 3072)taskTypeparameter for semantic retrieval optimizationbuildInlineDataPart,buildFileDataPart,buildGeminiParts)isGeminiEmbedding2Model()andresolveGeminiOutputDimensionality()helperssrc/memory/embeddings.ts: AddoutputDimensionalityandtaskTypetoEmbeddingProviderOptionsdocs/concepts/memory.md: Document new model option with config example and re-index warningsrc/memory/embeddings-gemini.test.ts: Comprehensive test coverage (26 tests)Key Features
gemini-embedding-001gemini-embedding-2-previewBackward Compatibility
gemini-embedding-001behavior unchanged (nooutputDimensionalityortaskTypesent)gemini-embedding-001Test Plan
model: "gemini-embedding-2-preview"produces valid text embeddingsoutputDimensionalitydefaults to 3072; configurable via optionstaskTypepassed appropriately for write vs. search operationsgemini-embedding-001behavior unchangedCloses #42487