chroma-core/chroma · error · ValueError
Invalid parameter name: {name} for configuration {self.__cla
Error message
Invalid parameter name: {name} for configuration {self.__class__.__name__} What it means
ConfigurationInternal.get_parameter (chromadb/api/configuration.py:155) raises this ValueError when asked for a parameter name not present in the configuration's parameter_map. Note that the map is always fully populated with defaults at construction, so a miss here means the name is not defined for this configuration class at all (the message includes the class name to make that obvious).
Source
Thrown at chromadb/api/configuration.py:155
return NotImplemented
return self.parameter_map == __value.parameter_map
@abstractmethod
def configuration_validator(self) -> None:
"""Perform custom validation when parameters are dependent on each other.
Raises an InvalidConfigurationError if the configuration is invalid.
"""
pass
def get_parameters(self) -> List[ConfigurationParameter]:
"""Returns the parameters of the configuration."""
return list(self.parameter_map.values())
def get_parameter(self, name: str) -> ConfigurationParameter:
"""Returns the parameter with the given name, or except if it doesn't exist."""
if name not in self.parameter_map:
raise ValueError(
f"Invalid parameter name: {name} for configuration {self.__class__.__name__}"
)
param_value = cast(ConfigurationParameter, self.parameter_map.get(name))
return param_value
def set_parameter(self, name: str, value: Union[str, int, float, bool]) -> None:
"""Sets the parameter with the given name to the given value."""
if name not in self.definitions:
raise ValueError(f"Invalid parameter name: {name}")
definition = self.definitions[name]
parameter = self.parameter_map[name]
if definition.is_static:
raise StaticParameterError(f"Cannot set static parameter: {name}")
if not definition.validator(value):
raise ValueError(f"Invalid value for parameter {name}: {value}")
parameter.value = value
@overrideView on GitHub (pinned to aecdd12c8a)
Solutions
- Enumerate what exists: [p.name for p in cfg.get_parameters()] or sorted(cfg.parameter_map)
- Use the new-style name (e.g. ef_search, not hnsw:search_ef) after checking the mapping in from_legacy_params
- Guard reads with `if name in cfg.parameter_map:` before calling get_parameter
Example fix
# before
value = cfg.get_parameter("ef") # unknown name
# after
print([p.name for p in cfg.get_parameters()]) # discover valid names
value = cfg.get_parameter("ef_search") Defensive patterns
Strategy: validation
Validate before calling
def get_param_or_none(cfg, name):
return cfg.get_parameter(name).value if name in cfg.parameter_map else None Try / catch
try:
p = cfg.get_parameter(name)
except ValueError as e:
if "Invalid parameter name" in str(e):
p = None # or fall back to a documented default
else:
raise Prevention
- Enumerate names once: [p.name for p in cfg.get_parameters()]
- Use new-style names (ef_search, not hnsw:search_ef)
- Guard dynamic lookups with `name in cfg.parameter_map`
When it happens
Trigger: cfg.get_parameter("ef") on an HNSW configuration where the name is "ef_search"; calling get_parameter("hnsw:space") with the legacy prefixed name; asking a non-HNSW configuration for an HNSW-only parameter.
Common situations: Using legacy parameter names from pre-configuration versions instead of the new names; assuming a parameter exists on every configuration class; autocomplete or IDE-driven guesses at parameter names.
Related errors
- Invalid parameter name: {parameter.name}
- Invalid parameter name: {name}
- Invalid configuration type: {parameter.value}
- Invalid parameter value: {parameter.value}
- Cannot set static parameter: {name}
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/b0396b3f4a44e699.
Report an issue: GitHub.