Skip to content

Chroma: add the MEVD provider - #58

Open
Laurianti wants to merge 1 commit into
CommunityToolkit:mainfrom
Laurianti:chroma-provider
Open

Laurianti wants to merge 1 commit into
CommunityToolkit:mainfrom
Laurianti:chroma-provider

Conversation

@Laurianti

@Laurianti Laurianti commented Oct 6, 2026 •

Copy link
Copy Markdown

Adds CommunityToolkit.VectorData.Chroma, the Chroma provider proposed in #57, with MEVD/test/Chroma.UnitTests and MEVD/test/Chroma.ConformanceTests. It follows the layout of the Qdrant provider, and builds on ChromaDotNet.Client as Qdrant builds on Qdrant.Client. I maintain ChromaDotNet.Client.

The conformance tests start chromadb/chroma:1.5.9 with Testcontainers, so the mevd.yml matrix picks them up. Chroma stores exactly one embedding per record, so there are no multi-vector and no-vector model tests. The hybrid search tests need Chroma Cloud: they run when Chroma:ConnectionString points to it, as the README of the tests says, and are skipped otherwise.

The same code, published as ChromaDotNet.VectorData 0.4.0, runs the Semantic Kernel and Agent Framework samples, and the Semantic Kernel hybrid search sample runs on Chroma Cloud.

The container is written in the tests, as for Weaviate. When Testcontainers.Chroma ships (testcontainers/testcontainers-dotnet#1784), it can replace it.

With the Aspire integration proposed in CommunityToolkit/Aspire#2219, builder.AddChromaClient("chroma") registers the ChromaClient that AddChromaVectorStore() takes from the container.

tryAGI/LangChain.Databases#180 adds Chroma to the tests of LangChain .NET with the same provider, and moves to this package when it ships.

.gitignore gets testsettings.*.json: the conformance tests READMEs, the PgVector one included, describe testsettings.development.json as git-ignored.

Fixes #57

Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Client reference leaks, non-idempotent disposal, and incorrect nullable-filter negation can cause resource and query failures.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Adds the Chroma MEVD provider, including mapping, filtering, vector/hybrid search, dependency injection, and test infrastructure.

Changes:

  • Implements the Chroma vector store and collection APIs.
  • Adds unit and container-based conformance tests.
  • Integrates Chroma into dependencies, solutions, and documentation.
File Description
README.md Lists the Chroma package.
MEVD/​test/​Chroma.UnitTests/​FakeEmbeddingGenerator.cs Adds a test embedding generator.
MEVD/​test/​Chroma.UnitTests/​ChromaVectorStoreTests.cs Tests vector-store behavior.
MEVD/​test/​Chroma.UnitTests/​ChromaMapperTests.cs Tests record mapping.
MEVD/​test/​Chroma.UnitTests/​ChromaHotel.cs Defines unit-test models.
MEVD/​test/​Chroma.UnitTests/​ChromaFilterTranslatorTests.cs Tests filter translation.
MEVD/​test/​Chroma.UnitTests/​ChromaCollectionTests.cs Tests collection operations.
MEVD/​test/​Chroma.UnitTests/​ChromaCollectionSearchMappingTests.cs Tests score conversion.
MEVD/​test/​Chroma.UnitTests/​ChromaCollectionCreateMappingTests.cs Tests collection definitions.
MEVD/​test/​Chroma.UnitTests/​Chroma.UnitTests.csproj Configures unit tests.
MEVD/​test/​Chroma.UnitTests/​.editorconfig Configures test analyzers.
MEVD/​test/​Chroma.ConformanceTests/​TypeTests/​ChromaKeyTypeTests.cs Covers supported keys.
MEVD/​test/​Chroma.ConformanceTests/​TypeTests/​ChromaEmbeddingTypeTests.cs Covers embedding types.
MEVD/​test/​Chroma.ConformanceTests/​TypeTests/​ChromaDataTypeTests.cs Covers metadata types.
MEVD/​test/​Chroma.ConformanceTests/​testsettings.json Provides test configuration.
MEVD/​test/​Chroma.ConformanceTests/​Support/​ChromaTestStore.cs Manages Chroma test instances.
MEVD/​test/​Chroma.ConformanceTests/​Support/​ChromaTestEnvironment.cs Loads test settings.
MEVD/​test/​Chroma.ConformanceTests/​Support/​ChromaFixture.cs Defines the shared fixture.
MEVD/​test/​Chroma.ConformanceTests/​README.md Documents conformance testing.
MEVD/​test/​Chroma.ConformanceTests/​ModelTests/​ChromaNoDataModelTests.cs Tests no-data models.
MEVD/​test/​Chroma.ConformanceTests/​ModelTests/​ChromaDynamicModelTests.cs Tests dynamic models.
MEVD/​test/​Chroma.ConformanceTests/​ModelTests/​ChromaBasicModelTests.cs Tests basic models.
MEVD/​test/​Chroma.ConformanceTests/​ChromaTestSuiteImplementationTests.cs Verifies suite coverage.
MEVD/​test/​Chroma.ConformanceTests/​ChromaIndexKindTests.cs Tests index support.
MEVD/​test/​Chroma.ConformanceTests/​ChromaHybridSearchTests.cs Tests cloud hybrid search.
MEVD/​test/​Chroma.ConformanceTests/​ChromaFilterTests.cs Tests filtering behavior.
MEVD/​test/​Chroma.ConformanceTests/​ChromaEmbeddingGenerationTests.cs Tests generated embeddings.
MEVD/​test/​Chroma.ConformanceTests/​ChromaDistanceFunctionTests.cs Tests distance functions.
MEVD/​test/​Chroma.ConformanceTests/​ChromaDependencyInjectionTests.cs Tests DI registrations.
MEVD/​test/​Chroma.ConformanceTests/​ChromaCollectionManagementTests.cs Tests collection management.
MEVD/​test/​Chroma.ConformanceTests/​Chroma.ConformanceTests.csproj Configures conformance tests.
MEVD/​src/​Chroma/​SharedChromaClient.cs Adds shared-client ownership.
MEVD/​src/​Chroma/​README.md Documents the provider.
MEVD/​src/​Chroma/​ChromaVectorStoreOptions.cs Defines store options.
MEVD/​src/​Chroma/​ChromaVectorStore.cs Implements the vector store.
MEVD/​src/​Chroma/​ChromaServiceCollectionExtensions.cs Adds DI extensions.
MEVD/​src/​Chroma/​ChromaModelBuilder.cs Validates collection models.
MEVD/​src/​Chroma/​ChromaMapper.cs Maps records and metadata.
MEVD/​src/​Chroma/​ChromaFilterTranslator.cs Translates LINQ filters.
MEVD/​src/​Chroma/​ChromaFieldMapping.cs Maps keys and documents.
MEVD/​src/​Chroma/​ChromaDynamicCollection.cs Adds dynamic collections.
MEVD/​src/​Chroma/​ChromaConstants.cs Defines provider constants.
MEVD/​src/​Chroma/​ChromaCollectionSearchMapping.cs Maps distances and thresholds.
MEVD/​src/​Chroma/​ChromaCollectionOptions.cs Defines collection options.
MEVD/​src/​Chroma/​ChromaCollectionCreateMapping.cs Maps collection schemas.
MEVD/​src/​Chroma/​ChromaCollection.cs Implements CRUD and search.
MEVD/​src/​Chroma/​Chroma.csproj Configures the provider package.
MEVD/​src/​Chroma/​AssemblyInfo.cs Adds assembly licensing.
MEVD/​MEVD.slnf Includes Chroma projects.
Directory.Packages.props Adds the Chroma client version.
CommunityToolkit.AI.slnx Includes Chroma projects.
.gitignore Ignores local test settings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread MEVD/src/Chroma/SharedChromaClient.cs
Comment thread MEVD/src/Chroma/ChromaFilterTranslator.cs Outdated
Comment thread MEVD/src/Chroma/ChromaVectorStore.cs Outdated
Comment thread MEVD/src/Chroma/ChromaVectorStoreOptions.cs Outdated
Laurianti added a commit to ChromaDotNet/ChromaDB.VectorData that referenced this pull request Oct 6, 2026
… does

The NativeAOT compiler of .NET 10.0.12 fails on the state machine of the handler when RunOperationAsync returns its task: "VTable ... not computed by the IL scanner".
Laurianti added a commit to ChromaDotNet/ChromaDB.VectorData that referenced this pull request Oct 6, 2026
Laurianti added a commit to ChromaDotNet/ChromaDB.VectorData that referenced this pull request Oct 6, 2026
The README says where the provider goes next, CommunityToolkit/AI#58, and what happens to this package then.

This branch has not been deployed

No deployments
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.

Add a Chroma provider (CommunityToolkit.VectorData.Chroma)

2 participants