Repository navigation
Conversation
Laurianti
force-pushed
the
chroma-integration
branch
from
October 4, 2026 14:50
b972db7 to
6feb898
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Persistence targets the wrong container directory, while client registration and health-check timeout handling have runtime gaps.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Adds ChromaDB hosting and client integrations, including Aspire resource modeling, dependency injection, persistence helpers, examples, and validation.
Changes:
- Adds Chroma container and client packages.
- Adds C# and TypeScript examples.
- Adds unit, integration, and startup tests plus documentation.
| File | Description |
|---|---|
tests/CommunityToolkit.Aspire.Hosting.Chroma.Tests/TypeScriptAppHostTests.cs |
Validates the TypeScript AppHost. |
tests/CommunityToolkit.Aspire.Hosting.Chroma.Tests/CommunityToolkit.Aspire.Hosting.Chroma.Tests.csproj |
Configures hosting tests. |
tests/CommunityToolkit.Aspire.Hosting.Chroma.Tests/AppHostTests.cs |
Tests health and collection operations. |
tests/CommunityToolkit.Aspire.Hosting.Chroma.Tests/AddChromaTests.cs |
Tests resource annotations and mounts. |
tests/CommunityToolkit.Aspire.Chroma.Tests/CommunityToolkit.Aspire.Chroma.Tests.csproj |
Configures client tests. |
tests/CommunityToolkit.Aspire.Chroma.Tests/ChromaClientExtensionsTests.cs |
Tests client and health-check registration. |
src/CommunityToolkit.Aspire.Hosting.Chroma/README.md |
Documents hosting usage and persistence. |
src/CommunityToolkit.Aspire.Hosting.Chroma/CommunityToolkit.Aspire.Hosting.Chroma.csproj |
Defines the hosting package. |
src/CommunityToolkit.Aspire.Hosting.Chroma/ChromaResource.cs |
Models the Chroma resource and connection properties. |
src/CommunityToolkit.Aspire.Hosting.Chroma/ChromaContainerImageTags.cs |
Defines container image metadata. |
src/CommunityToolkit.Aspire.Hosting.Chroma/ChromaBuilderExtensions.cs |
Adds hosting and persistence APIs. |
src/CommunityToolkit.Aspire.Chroma/README.md |
Documents client registration and configuration. |
src/CommunityToolkit.Aspire.Chroma/CommunityToolkit.Aspire.Chroma.csproj |
Defines the client package. |
src/CommunityToolkit.Aspire.Chroma/ChromaHealthCheck.cs |
Implements heartbeat health checking. |
src/CommunityToolkit.Aspire.Chroma/ChromaClientSettings.cs |
Defines and parses client settings. |
src/CommunityToolkit.Aspire.Chroma/AspireChromaExtensions.cs |
Registers keyed and unkeyed clients. |
README.md |
Lists both Chroma packages. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.ServiceDefaults/Extensions.cs |
Adds shared Aspire service defaults. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.ServiceDefaults/CommunityToolkit.Aspire.Hosting.Chroma.ServiceDefaults.csproj |
Configures service defaults. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost/Program.cs |
Orchestrates Chroma and the API example. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.csproj |
Configures the C# AppHost. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/tsconfig.json |
Configures TypeScript compilation. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/package.json |
Defines TypeScript tooling. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/package-lock.json |
Locks TypeScript dependencies. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/eslint.config.mjs |
Configures TypeScript linting. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/aspire.config.json |
Maps the hosting package into Aspire. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/apphost.mts |
Exercises exported hosting APIs. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.ApiService/Properties/launchSettings.json |
Defines local launch profiles. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.ApiService/Program.cs |
Demonstrates create and query operations. |
examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.ApiService/CommunityToolkit.Aspire.Hosting.Chroma.ApiService.csproj |
Configures the example API. |
Directory.Packages.props |
Pins ChromaDotNet.Client. |
CommunityToolkit.Aspire.slnx |
Adds source and test projects. |
Files not reviewed (1)
- examples/chromadb/CommunityToolkit.Aspire.Hosting.Chroma.AppHost.TypeScript/package-lock.json: Generated file
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Laurianti
force-pushed
the
chroma-integration
branch
from
October 4, 2026 15:00
6feb898 to
2629eec
Compare
Laurianti
added a commit
to ChromaDotNet/ChromaDB.Aspire
that referenced
this pull request
Oct 4, 2026
Directory.Packages.props and the README of ChromaDotNet.Aspire.Client are ours, so the sync does not change them: they follow CommunityToolkit/Aspire#2219.
This was referenced Oct 5, 2026
This contribution adds support for ChromaDB as a .NET Aspire resource, including: - Hosting integration for containerized ChromaDB - Client integration with health checks and keyed service support - Persistence support via volumes and bind mounts - Comprehensive unit tests and documentation
- Removed auto-generated api files. - Refactored ChromaResource to use a primary constructor. - Corrected style for null checks (is null). - Added example app with CRUD operations in examples/chromadb. - Added integration tests for health and CRUD verification. - Updated tests.yml workflow to include new tests.
…Settings.json for ApiService
- ChromaDotNet.Client 2.10.2 in place of ChromaDB.Client 1.0.0, whose v1
API Chroma 1.x removed: image chromadb/chroma:1.5.9, health check on
/api/v2/heartbeat, connection string Endpoint=http://{host}:{port}.
- [AspireExport] on the hosting API, ChromaResource in
Aspire.Hosting.ApplicationModel, TypeScript AppHost example and test.
- The example service gets its collection clients from the ChromaClient.
- WithDataVolume and WithDataBindMount mount /data, where Chroma 1.x
persists.
- The client integration creates the ChromaClient with
CreateChromaClient, cancels the health check at HealthCheckTimeout,
reads its settings from Aspire:Chroma:Client and names the health
checks Chroma and Chroma_{connectionName}.
- Traces and metrics of the client, with DisableTracing and
DisableMetrics, and the conformance tests of the toolkit.
- AOT compatible, with the configuration binding generator.
- Chroma Cloud: Token, Tenant and Database in the connection string and
in the settings.
- Package READMEs and the root README table.
Co-authored-by: Ali <139616302+ali-Hamza817@users.noreply.github.com>
Laurianti
force-pushed
the
chroma-integration
branch
from
October 7, 2026 00:07
348a721 to
c4eef24
Compare
This branch has not been deployed
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.


Closes #2218
Picks up #1132 by @ali-Hamza817: his commits are kept as they are.
ChromaDB.Client1.0.0 (v1 API only, removed in Chroma 1.x) replaced byChromaDotNet.Client2.10.2. Imagechromadb/chroma:1.5.9, health check on/api/v2/heartbeat, connection stringEndpoint=http://{host}:{port}.[AspireExport]on the hosting API,ChromaResourceinAspire.Hosting.ApplicationModel, TypeScript AppHost example and test.ChromaClient, so the workaround that rebuilt the endpoint is gone.WithDataVolumeandWithDataBindMountmount/data, where Chroma 1.x persists.ChromaClientwithCreateChromaClientofChromaDotNet.Client.DependencyInjection, so each request goes through the current handler of theHttpClientnamed after the connection, and cancels the health check atHealthCheckTimeout. Like the other client integrations, it reads its settings fromAspire:Chroma:Clientand names the health checksChromaandChroma_{connectionName}.db.client.operation.duration, withDisableTracingandDisableMetrics, and the conformance tests of the toolkit.Endpoint=https://api.trychroma.com;Token=...;Tenant=...;Database=..., and so do the settings. The token goes in theX-Chroma-Tokenheader.The Chroma provider for Microsoft.Extensions.VectorData proposed in CommunityToolkit/AI#58 takes this
ChromaClientfrom the container:builder.AddChromaClient("chroma"), thenbuilder.Services.AddChromaVectorStore().Tests: client 42, with the 2 configuration schema tests skipped as in the other integrations. Hosting 9 (unit, AppHost with a create/add/query round trip against Chroma 1.5.9, data persisted between runs on a volume and a bind mount, TypeScript AppHost). All pass locally, and a round trip through
AddChromaClienton Chroma Cloud passed too.PR Checklist
Other information
The docs page on aspire.dev follows once this is merged.
Co-authored-by: Ali 139616302+ali-Hamza817@users.noreply.github.com