refactor(semantic-search): use ai sdk embedder contract#70
Merged
Conversation
Greptile SummaryThis PR refactors semantic-search embedding to use a generic AI SDK embedder contract. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "refactor(semantic-search): use ai sdk em..." | Re-trigger Greptile |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
aryasaatvik
added a commit
that referenced
this pull request
Jun 27, 2026
## Summary - add batch-oriented AI Search reindexing so hosts can submit bounded catalog pages - make AI Search item names fingerprinted and reconcile remote/local item state safely - update the semantic-search operator UI copy/status/error handling for Cloudflare AI Search ## Validation - bun run --filter @executor-js/plugin-semantic-search test -- src/sdk/ai-search.test.ts src/sdk/plugin.test.ts - bun run --filter @executor-js/plugin-semantic-search typecheck - ./node_modules/.bin/oxfmt --check packages/plugins/semantic-search/src/api/group.ts packages/plugins/semantic-search/src/api/handlers.ts packages/plugins/semantic-search/src/react/SearchPage.tsx packages/plugins/semantic-search/src/sdk/ai-search.test.ts packages/plugins/semantic-search/src/sdk/ai-search.ts packages/plugins/semantic-search/src/sdk/documents.ts packages/plugins/semantic-search/src/sdk/index.ts packages/plugins/semantic-search/src/sdk/plugin.test.ts packages/plugins/semantic-search/src/sdk/plugin.ts packages/plugins/semantic-search/src/sdk/tool-search-backend.ts - ./node_modules/.bin/oxlint -c .oxlintrc.jsonc packages/plugins/semantic-search/src/api/group.ts packages/plugins/semantic-search/src/api/handlers.ts packages/plugins/semantic-search/src/react/SearchPage.tsx packages/plugins/semantic-search/src/sdk/ai-search.test.ts packages/plugins/semantic-search/src/sdk/ai-search.ts packages/plugins/semantic-search/src/sdk/documents.ts packages/plugins/semantic-search/src/sdk/index.ts packages/plugins/semantic-search/src/sdk/plugin.test.ts packages/plugins/semantic-search/src/sdk/plugin.ts packages/plugins/semantic-search/src/sdk/tool-search-backend.ts --deny-warnings <!-- stack:links:start --> ### [Stack](https://github.com/aryasaatvik/stack) 1. **#69** 👈 current 2. #70 <!-- stack:links:end -->
3fdfcc0 to
ee8e9bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Simplifies the semantic-search vector embedding API to a single AI SDK-backed
makeEmbeddercontract. Hosts now create provider models and pass an explicit embedder into the vector backend.Changes
makeEmbedder.workersAi,geminiApiKey, and embedder model config.Tests
./node_modules/.bin/oxfmt --check packages/plugins/semantic-search/src/sdk/embedder.ts packages/plugins/semantic-search/src/sdk/embedder.test.ts packages/plugins/semantic-search/src/sdk/embedding-service.ts packages/plugins/semantic-search/src/sdk/eval.ts packages/plugins/semantic-search/src/sdk/index.ts packages/plugins/semantic-search/src/sdk/tool-search-backend.ts packages/plugins/semantic-search/package.json packages/plugins/semantic-search/tsup.config.ts./node_modules/.bin/oxlint -c .oxlintrc.jsonc packages/plugins/semantic-search/src/sdk/embedder.ts packages/plugins/semantic-search/src/sdk/embedder.test.ts packages/plugins/semantic-search/src/sdk/embedding-service.ts packages/plugins/semantic-search/src/sdk/eval.ts packages/plugins/semantic-search/src/sdk/index.ts packages/plugins/semantic-search/src/sdk/tool-search-backend.ts --deny-warningsbun run --filter @executor-js/plugin-semantic-search test -- src/sdk/embedder.test.ts src/sdk/plugin.test.ts src/sdk/search.test.tsbun run --filter @executor-js/plugin-semantic-search typecheckbun run --filter @executor-js/plugin-semantic-search testStack