Skip to content

fix: accept default /tmp/chroma path in ChromaDbConfig validator#4179

Merged
kartik-mem0 merged 1 commit intomem0ai:mainfrom
Br1an67:fix/issue-3881-chroma-path
Mar 23, 2026
Merged

fix: accept default /tmp/chroma path in ChromaDbConfig validator#4179
kartik-mem0 merged 1 commit intomem0ai:mainfrom
Br1an67:fix/issue-3881-chroma-path

Conversation

@Br1an67
Copy link
Copy Markdown
Contributor

@Br1an67 Br1an67 commented Mar 1, 2026

Description

When using the chroma vector store provider without explicitly setting a path, VectorStoreConfig auto-generates path="/tmp/chroma". However, ChromaDbConfig.check_connection_config explicitly excluded /tmp/chroma from being considered a valid local configuration path, causing a ValueError.

The fix removes the /tmp/chroma exclusion from the local_config check so the auto-generated default path is accepted. The cloud config path-stripping logic (which removes the auto-generated path when cloud credentials are provided) is unaffected.

Fixes #3881

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit Test

Added two tests:

  • test_chroma_config_accepts_default_tmp_path: verifies ChromaDbConfig(path="/tmp/chroma") succeeds
  • test_chroma_config_rejects_no_config: verifies ChromaDbConfig() with no arguments still raises ValueError

All 17 chroma tests pass.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

VectorStoreConfig auto-sets path="/tmp/chroma" when no path is provided,
but ChromaDbConfig explicitly excluded this path from valid local config,
causing a ValueError. Remove the exclusion so the default path works.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 1, 2026

CLA assistant check
All committers have signed the CLA.

@Br1an67
Copy link
Copy Markdown
Contributor Author

Br1an67 commented Mar 8, 2026

Hi — just a gentle bump on this. Happy to make any changes if needed!

@Himanshu-Sangshetti
Copy link
Copy Markdown
Contributor

@kartik-mem0 / @whysosaket, the PR LGTM for merge

Old code skipped counting /tmp/chroma as local so cloud + injected default path wouldn’t look like “cloud + local.” That broke real local configs that only had the default path. The fix: strip /tmp/chroma when cloud creds are set (unchanged), then treat any remaining path as local. Cloud still works; local default path validates.

Verification
I reviewed the logic above and ran tests/vector_stores/test_chroma.py (including test_chroma_config_accepts_default_tmp_path and the no-config rejection case); tests pass.

@kartik-mem0 kartik-mem0 merged commit cc45561 into mem0ai:main Mar 23, 2026
6 of 7 checks passed
jamebobob pushed a commit to jamebobob/mem0-vigil-recall that referenced this pull request Mar 29, 2026
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.

"/tmp/chroma" not seen as a valid path for chroma provider

4 participants