Skip to content

Chroma: update ChromaDotNet.Client to 2.14.0, reject reserved storage names, support nullable inline arrays - #69

Merged
adamsitnik merged 8 commits into
CommunityToolkit:mainfrom
Laurianti:chroma-followup
Oct 14, 2026
Merged

adamsitnik merged 8 commits into
CommunityToolkit:mainfrom
Laurianti:chroma-followup

Conversation

@Laurianti

@Laurianti Laurianti commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #58.

Fixes

  • A data property whose storage name is empty or starts with # or $, like [VectorStoreData(StorageName = "#id")]. Chroma rejects these metadata keys, and uses the # ones, like #id and #document, in its Search API. Before, the collection was created, a write with a value failed on Chroma 1.5.9 and Chroma Cloud with "Invalid metadata at index 0", and with #id a filter like r.Tag == "meta-a" matched the record whose key is meta-a. Now the collection throws NotSupportedException when it is created.
  • new int?[] { 1, 2 }.Contains(r.NullableInt) threw NotSupportedException: "Inline array elements must be constants", because the compiler converts each element to int?. Now it becomes {"NullableInt":{"$in":[1,2]}}, as a comparison with a nullable property does.

Changes

  • ChromaDotNet.Client from 2.11.0 to 2.14.0, with several fixes and improvements: see its release notes.
  • README: four limitations. On self-hosted Chroma 1.0.21 to 1.5.9 a vector search can miss a record after an upsert; Chroma Cloud has a quota of 32 metadata keys, and of 36 bytes per key; on Chroma Cloud, Contains needs at least 3 characters.
  • Provider version bumped to 1.0.1-preview.

Tests

  • 15 new unit tests. 13 fail without the fix of their commit; the other two check that a # or a $ inside a storage name is still accepted.
  • Conformance tests: 218 passed and 7 skipped on chromadb/chroma:1.5.9, 225 passed on Chroma Cloud, as on main.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 22:34

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.

🟡 Changes recommended

The new validation still permits $-prefixed metadata names that Chroma rejects during writes.

1 open finding
What changed in this PR

Adds safer Chroma model validation, nullable inline-array filtering, updated client behavior, and documented service limitations.

Changes:

  • Rejects #-prefixed metadata storage names.
  • Supports nullable inline arrays in Contains filters.
  • Updates ChromaDotNet.Client and provider documentation/version.
File Description
MEVD/​test/​Chroma.UnitTests/​ChromaHotel.cs Adds a reserved-name test model.
MEVD/​test/​Chroma.UnitTests/​ChromaFilterTranslatorTests.cs Tests nullable inline-array translation.
MEVD/​test/​Chroma.UnitTests/​ChromaCollectionTests.cs Tests storage-name validation.
MEVD/​src/​Chroma/​README.md Documents Chroma limitations and mitigations.
MEVD/​src/​Chroma/​ChromaModelBuilder.cs Validates reserved metadata prefixes.
MEVD/​src/​Chroma/​ChromaFilterTranslator.cs Extracts converted nullable constants.
MEVD/​src/​Chroma/​Chroma.csproj Bumps the provider version.
Directory.Packages.props Updates ChromaDotNet.Client to 2.14.0.

🧠 Review effort: Balanced


💡 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/ChromaModelBuilder.cs Outdated

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.

🟢 Approval recommended

The implementation, tests, documentation, dependency update, and required provider version bump are consistent and complete.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@adamsitnik adamsitnik 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.

LGTM, thank you for your contribution @Laurianti !

@adamsitnik
adamsitnik merged commit d479b99 into CommunityToolkit:main Oct 14, 2026
18 checks passed
@adamsitnik

Copy link
Copy Markdown
Contributor
image

@Laurianti
Laurianti deleted the chroma-followup branch October 14, 2026 08:22
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.

3 participants