chroma-core/chroma · error · ValueError
Updating '{key}' is not supported for chroma-cloud-splade
Error message
Updating '{key}' is not supported for chroma-cloud-splade What it means
validate_config_update for chroma-cloud-splade iterates over the immutable keys {'include_tokens', 'model'} and raises ValueError when such a key is present in new_config with a value different from old_config. Unlike the Qwen function (presence alone triggers), SPLADE only rejects actual value changes — you may resend the same model/include_tokens harmlessly.
Source
Thrown at chromadb/utils/embedding_functions/chroma_cloud_splade_embedding_function.py:175
api_key_env_var=api_key_env_var,
model=ChromaCloudSpladeEmbeddingModel(model),
include_tokens=config.get("include_tokens", False),
)
def get_config(self) -> Dict[str, Any]:
return {
"api_key_env_var": self.api_key_env_var,
"model": self.model.value,
"include_tokens": self.include_tokens,
}
def validate_config_update(
self, old_config: Dict[str, Any], new_config: Dict[str, Any]
) -> None:
immutable_keys = {"include_tokens", "model"}
for key in immutable_keys:
if key in new_config and new_config[key] != old_config.get(key):
raise ValueError(
f"Updating '{key}' is not supported for chroma-cloud-splade"
)
@staticmethod
def validate_config(config: Dict[str, Any]) -> None:
validate_config_schema(config, "chroma-cloud-splade")
View on GitHub (pinned to aecdd12c8a)
Solutions
- Revert the changed value, or omit 'model'/'include_tokens' from the update if unchanged.
- To change include_tokens or model, build a new ChromaCloudSpladeEmbeddingFunction and a new collection (vector comparability requires it).
- When diffing configs, compare against the collection's current get_config() output so identical values are not flagged.
Example fix
# before
new_config = {"include_tokens": True} # old had False -> ValueError
# after: recreate with the setting you need
from chromadb.utils.embedding_functions import ChromaCloudSpladeEmbeddingFunction, ChromaCloudSpladeEmbeddingModel
ef = ChromaCloudSpladeEmbeddingFunction(
api_key_env_var="CHROMA_API_KEY",
model=ChromaCloudSpladeEmbeddingModel.SPLADE_PP_EN_V1,
include_tokens=True,
)
col2 = client.create_collection("docs_v2", embedding_function=ef) Defensive patterns
Strategy: validation
Validate before calling
for key in ("model", "include_tokens"):
if key in new_config and new_config[key] != old_config.get(key):
raise ValueError(
f"{key} is immutable for chroma-cloud-splade; recreate the collection to change it"
) Type guard
def is_safe_splade_update(old: dict, new: dict) -> bool:
return all(new.get(k) == old.get(k) for k in ("model", "include_tokens") if k in new) Prevention
- Diff updates against the collection's live get_config(), not a cached copy.
- Decide include_tokens at collection creation; treat it as part of the schema.
- Omit unchanged immutable keys from update payloads entirely.
When it happens
Trigger: An EF config update where new_config['model'] != old_config['model'] or new_config['include_tokens'] != old_config['include_tokens'], e.g. switching include_tokens from false to true, or swapping prithivida/Splade_PP_en_v1 for another model.
Common situations: Trying to enable token fetching (include_tokens) on an existing collection; model migrations attempted via config edit; diffs computed against a stale old_config making equal values look different.
Related errors
- The model cannot be changed after the embedding function has
- The task cannot be changed after the embedding function has
- The instructions cannot be changed after the embedding funct
- The httpx python package is not installed. Please install it
- Failed to get embeddings from Chroma Cloud API: HTTP {e.resp
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/4d1afece6d9eac0f.
Report an issue: GitHub.