Skip to content

chore: remove the mcp autoembeddings feature#978

Merged
nirinchev merged 10 commits intomainfrom
ni/remove-custom-embeddings
Mar 18, 2026
Merged

chore: remove the mcp autoembeddings feature#978
nirinchev merged 10 commits intomainfrom
ni/remove-custom-embeddings

Conversation

@nirinchev
Copy link
Collaborator

Proposed changes

Remove custom auto embeddings feature in favor of the native one.

@coveralls
Copy link
Collaborator

coveralls commented Mar 14, 2026

Pull Request Test Coverage Report for Build 23235404787

Warning: 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

  • 43 of 43 (100.0%) changed or added relevant lines in 9 files are covered.
  • 80 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.2%) to 84.992%

Files with Coverage Reduction New Missed Lines %
src/common/config/configOverrides.ts 1 89.71%
src/tools/tool.ts 4 86.94%
src/tools/mongodb/mongodbTool.ts 5 83.2%
src/common/session.ts 6 84.94%
src/common/sessionStore.ts 18 76.74%
src/transports/streamableHttp.ts 46 82.07%
Totals Coverage Status
Change from base Build 23160171996: -0.2%
Covered Lines: 9933
Relevant Lines: 11445

💛 - Coveralls

nirinchev and others added 3 commits March 17, 2026 03:38
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>
@nirinchev nirinchev marked this pull request as ready for review March 18, 2026 08:03
@nirinchev nirinchev requested a review from a team as a code owner March 18, 2026 08:03
Copilot AI review requested due to automatic review settings March 18, 2026 08:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + VectorSearchEmbeddingsManager and 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 (searchmcpUI).
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.

Copy link
Collaborator

@cveticm cveticm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Tested Atlas Local to auto-embedded search flow locally, works as before 👍

@nirinchev nirinchev merged commit 276a98d into main Mar 18, 2026
25 of 27 checks passed
@nirinchev nirinchev deleted the ni/remove-custom-embeddings branch March 18, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants