chroma-core/chroma · error · ValueError
Invalid configuration type: {parameter.value}
Error message
Invalid configuration type: {parameter.value} What it means
Raised in ConfigurationInternal.__init__ (chromadb/api/configuration.py:112) when a parameter value is a dict (i.e. a nested, recursive configuration) whose "_type" key does not resolve to a known ConfigurationInternal subclass in this module's globals. The _type discriminator is what from_json uses to pick the concrete class for the nested value; an unknown, misspelled, or renamed _type means the nested configuration cannot be reconstructed.
Source
Thrown at chromadb/api/configuration.py:112
# All expected parameters must be present with defaults or None values at initialization
parameter_map: Dict[str, ConfigurationParameter]
definitions: ClassVar[Dict[str, ConfigurationDefinition]]
def __init__(self, parameters: Optional[List[ConfigurationParameter]] = None):
"""Initializes a new instance of the Configuration class. Respecting defaults and
validators."""
self.parameter_map = {}
if parameters is not None:
for parameter in parameters:
if parameter.name not in self.definitions:
raise ValueError(f"Invalid parameter name: {parameter.name}")
definition = self.definitions[parameter.name]
# Handle the case where we have a recursive configuration definition
if isinstance(parameter.value, dict):
child_type = globals().get(parameter.value.get("_type", None))
if child_type is None:
raise ValueError(
f"Invalid configuration type: {parameter.value}"
)
parameter.value = child_type.from_json(parameter.value)
if not isinstance(parameter.value, type(definition.default_value)):
raise ValueError(f"Invalid parameter value: {parameter.value}")
parameter_validator = definition.validator
if not parameter_validator(parameter.value):
raise ValueError(f"Invalid parameter value: {parameter.value}")
self.parameter_map[parameter.name] = parameter
# Apply the defaults for any missing parameters
for name, definition in self.definitions.items():
if name not in self.parameter_map:
self.parameter_map[name] = ConfigurationParameter(
name=name, value=definition.default_value
)
self.configuration_validator()View on GitHub (pinned to aecdd12c8a)
Solutions
- Set _type to the exact class name of a ConfigurationInternal subclass defined in chromadb.api.configuration (e.g. "HNSWConfigurationInternal")
- If the JSON came from another version, regenerate it with the current chromadb or upgrade to the version that knows that class
- Drop the nested dict and pass the value in its already-constructed form
Example fix
# before
raw = {"hnsw": {"_type": "HNSWConfiguration", "M": 16}} # wrong _type
# after
raw = {"hnsw": {"_type": "HNSWConfigurationInternal", "M": 16}} Defensive patterns
Strategy: validation
Validate before calling
import chromadb.api.configuration as cfgmod
from chromadb.api.configuration import ConfigurationInternal
def known_config_types():
return {name for name in dir(cfgmod)
if isinstance(getattr(cfgmod, name, None), type)
and issubclass(getattr(cfgmod, name), ConfigurationInternal)}
def valid_nested(value: dict) -> bool:
return value.get("_type") in known_config_types() Prevention
- Stamp nested dicts with the exact class name from the current module (e.g. HNSWConfigurationInternal)
- Re-serialize configs via to_json() rather than hand-writing them
- On version upgrades, verify stored _type names still exist before loading
When it happens
Trigger: Nested config JSON like {"_type": "HNSWConfiguration", ...} when the class is actually named HNSWConfigurationInternal; _type missing entirely (globals().get(None) returns None); loading nested config produced by another chromadb version where the class was renamed or did not yet exist.
Common situations: Persisted collection or system configuration replayed after a chromadb upgrade or downgrade; hand-authored JSON configs with a guessed _type value; cross-environment moves (dev config applied in prod with different chromadb versions).
Related errors
- Trying to instantiate configuration of type {cls.__name__} f
- Invalid parameter name: {parameter.name}
- Invalid parameter value: {parameter.value}
- Invalid parameter name: {name} for configuration {self.__cla
- Invalid parameter name: {name}
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/bf215e36e72dc772.
Report an issue: GitHub.