chore: remove the mcp autoembeddings feature#978
Conversation
Pull Request Test Coverage Report for Build 23235404787Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Resolved conflicts: - src/common/schemas.ts: kept main's new previewFeatures (search, streams) and monitoringServerFeatureValues; excluded similarityValues (removed by this branch) - src/common/config/userConfig.ts: kept main's argMetadata and monitoringServerFeatureValues imports; excluded similarityValues import - README.md: kept main's updated table (added streams confirmation tools, wider columns); removed embeddings-specific rows (embeddingsValidation, vectorSearchDimensions, vectorSearchSimilarityFunction); merged preview features list keeping all three (search, streams, mcpUI) - tests/integration/tools/mongodb/delete/dropIndex.test.ts: kept HEAD's flat structure (feature flag already removed); discarded main's vectorSearchEnabled-conditional duplicate tests that already exist in HEAD Co-Authored-By: Claude Code <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR removes the MCP server’s custom “auto embeddings” implementation (Voyage-based embedding generation + embeddings validation/cache) and shifts the MongoDB tooling toward MongoDB’s native vector search behavior (manual queryVector arrays for classic vector indexes, and auto-embed index querying via query).
Changes:
- Removes the custom embeddings provider +
VectorSearchEmbeddingsManagerand all related configuration/test coverage. - Updates MongoDB tool schemas/behavior to drop
embeddingParameters(e.g.,insert-many,aggregate) and rely on native vector search expectations. - Refactors integration/unit/accuracy tests and docs/config surfaces to reflect the removal.
Reviewed changes
Copilot reviewed 50 out of 51 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/toolBase.test.ts | Updates preview feature test cases (switches from search to mcpUI). |
| tests/unit/resources/common/debug.test.ts | Removes VectorSearchEmbeddingsManager from test Session wiring. |
| tests/unit/helpers/manageNestedFieldPaths.test.ts | Deletes unit tests for removed nested-field setter helper. |
| tests/unit/common/session.test.ts | Removes VectorSearchEmbeddingsManager from Session construction in tests. |
| tests/unit/common/search/vectorSearchEmbeddingsManager.test.ts | Deletes unit tests for removed embeddings manager. |
| tests/unit/common/config/configOverrides.test.ts | Removes overrides/tests for embeddings-related config fields. |
| tests/unit/common/config.test.ts | Removes embeddings-related default expectations. |
| tests/integration/ui/mcpUIFeature.test.ts | Removes embeddings manager from integration Session setup. |
| tests/integration/transports/configOverrides.test.ts | Updates preview feature override tests (search → mcpUI). |
| tests/integration/transports/base.test.ts | Removes search from previewFeatures in transport tests. |
| tests/integration/tools/mongodb/read/aggregate.test.ts | Updates aggregate tool tests for new pipeline schema/removed MCP embeddings metadata. |
| tests/integration/tools/mongodb/mongodbTool.test.ts | Removes embeddings manager from MongoDB tool integration wiring. |
| tests/integration/tools/mongodb/metadata/collectionIndexes.test.ts | Adjusts expectations: search indexes listed based on cluster support rather than preview flag. |
| tests/integration/tools/mongodb/delete/dropIndex.test.ts | Refactors tests to always support `type: classic |
| tests/integration/tools/mongodb/create/insertMany.test.ts | Removes embeddingParameters tool metadata/tests and Voyage-based embedding generation scenarios. |
| tests/integration/tools/mongodb/create/createIndex.test.ts | Updates create-index metadata/schema tests and refactors scenarios around search/vectorSearch/autoEmbed. |
| tests/integration/telemetry.test.ts | Removes embeddings manager from telemetry integration setup. |
| tests/integration/server.test.ts | Removes embeddings manager from server integration setup. |
| tests/integration/helpers.ts | Removes embeddings manager from integration test Session setup helper. |
| tests/e2e/cli.test.ts | Removes CLI warnings tests tied to embeddings provider misconfiguration. |
| tests/accuracy/sdk/describeAccuracyTests.ts | Removes Voyage API key injection into accuracy test configs. |
| tests/accuracy/insertMany.embeddings.test.ts | Deletes accuracy tests specific to MCP-generated embeddings during insert-many. |
| tests/accuracy/insertMany.autoEmbeddings.test.ts | Removes voyageApiKey/search preview config from auto-embed accuracy setup. |
| tests/accuracy/dropIndex.test.ts | Removes search preview feature config from accuracy setup. |
| tests/accuracy/createIndex.autoEmbeddings.test.ts | Removes voyageApiKey/search preview config from auto-embed accuracy setup. |
| tests/accuracy/aggregate.test.ts | Removes search preview feature config from accuracy setup. |
| tests/accuracy/aggregate.autoEmbeddings.test.ts | Removes voyageApiKey/search preview config from auto-embed accuracy setup. |
| src/transports/base.ts | Stops constructing VectorSearchEmbeddingsManager as part of Session setup. |
| src/tools/mongodb/read/export.ts | Switches to shared AggregateArgs instead of feature-flag-dependent args builder. |
| src/tools/mongodb/read/aggregate.ts | Removes MCP-side query embedding generation; simplifies args; updates index existence checks and telemetry. |
| src/tools/mongodb/mongodbSchemas.ts | Removes Voyage embedding parameter schemas; constrains classic vector search to numeric queryVector. |
| src/tools/mongodb/metadata/explain.ts | Switches to shared AggregateArgs for explain(aggregate). |
| src/tools/mongodb/metadata/collectionIndexes.ts | Lists search/vector search indexes whenever the cluster supports search (no preview flag gate). |
| src/tools/mongodb/delete/dropIndex.ts | Makes type always `classic |
| src/tools/mongodb/create/insertMany.ts | Removes embeddingParameters and MCP-side embedding generation/validation. |
| src/tools/mongodb/create/createIndex.ts | Removes embeddings-manager coupling; inlines defaults/enums previously sourced from removed components/config. |
| src/telemetry/types.ts | Removes server property embeddingProviderConfigured; constrains embeddings metadata to "mongot". |
| src/server.ts | Stops emitting embeddingProviderConfigured server telemetry property. |
| src/helpers/manageNestedFieldPaths.ts | Deletes nested-field setter helper previously used by embeddings insertion flow. |
| src/common/session.ts | Removes embeddings manager from Session options/state. |
| src/common/search/vectorSearchEmbeddingsManager.ts | Deletes custom embeddings manager (cache, validation, index lookup, embeddings generation). |
| src/common/search/embeddingsProvider.ts | Deletes Voyage-based embeddings provider implementation. |
| src/common/schemas.ts | Removes shared similarity enum/types (previously used by embeddings/index tooling). |
| src/common/errors.ts | Removes error codes only used by custom embeddings flow. |
| src/common/config/userConfig.ts | Removes embeddings-related config fields (dimensions/similarity/validation); keeps voyageApiKey. |
| src/common/config/parseUserConfig.ts | Removes warnings about search/embeddings-provider misconfiguration. |
| server.json | Removes CLI options for embeddings validation and vector search defaults. |
| pnpm-lock.yaml | Removes Voyage provider deps and adjusts ai dependency placement. |
| package.json | Drops voyage-ai-provider; moves ai to devDependencies. |
| README.md | Removes docs for deleted config options; updates preview-features examples and adds mcpUI bullet. |
| .github/dependabot.yml | Removes dependabot pattern for voyage-ai-provider. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
cveticm
left a comment
There was a problem hiding this comment.
LGTM
Tested Atlas Local to auto-embedded search flow locally, works as before 👍
Proposed changes
Remove custom auto embeddings feature in favor of the native one.