infiniflow/ragflow · error · ValueError
cpn `{name}` has redundant parameters: `{[redundant_attrs]}`
Error message
cpn `{name}` has redundant parameters: `{[redundant_attrs]}` What it means
After recursively applying a config to a component's param object, any config keys that do not correspond to declared attributes are collected as 'redundant'. When allow_redundant is false, their presence raises this ValueError naming the component and the extra keys — a strict schema check for component params.
Source
Thrown at agent/component/base.py:184
# add user feeded params
user_feeded_params_set.add(full_config_key)
# update user feeded deprecated param set
if full_config_key in deprecated_params_set:
feeded_deprecated_params_set.add(full_config_key)
# supported attr
attr = getattr(param, config_key)
if type(attr).__name__ in dir(builtins) or attr is None:
setattr(param, config_key, config_value)
else:
# recursive set obj attr
sub_params = _recursive_update_param(attr, config_value, depth + 1, prefix=f"{prefix}{config_key}.")
setattr(param, config_key, sub_params)
if not allow_redundant and redundant_attrs:
raise ValueError(f"cpn `{getattr(self, '_name', type(self))}` has redundant parameters: `{[redundant_attrs]}`")
return param
return _recursive_update_param(param=self, config=conf, depth=0, prefix="")
def extract_not_builtin(self):
def _get_not_builtin_types(obj):
ret_dict = {}
for variable in obj.__dict__:
attr = getattr(obj, variable)
if attr and type(attr).__name__ not in dir(builtins):
ret_dict[variable] = _get_not_builtin_types(attr)
return ret_dict
return _get_not_builtin_types(self)
def validate(self):View on GitHub (pinned to 554fb1133a)
Solutions
- Compare the redundant key names in the error against the component's current Param class; rename or remove them.
- If the workflow came from another version, re-create the node in the current UI rather than importing raw JSON.
- Strip metadata/extra keys from the config before update if they are not component params.
- For forward-compatible loading, pass allow_redundant=True only as a deliberate migration choice, not a blanket fix.
Example fix
# before
conf = {"llm_id": "x", "temprature": 0.7} # typo'd key -> redundant
# after
conf = {"llm_id": "x", "temperature": 0.7} Defensive patterns
Strategy: type-guard
Validate before calling
def strip_unknown_keys(conf, param_obj):
declared = set(vars(param_obj).keys())
return {k: v for k, v in conf.items() if k in declared} Type guard
def keys_are_declared(conf, param_obj) -> bool:
declared = set(vars(param_obj).keys())
return set(conf.keys()) <= declared Try / catch
try:
param.update(conf)
except ValueError as e:
if 'redundant parameters' in str(e):
conf = strip_unknown_keys(conf, param)
param.update(conf) # retry only as deliberate migration Prevention
- Validate imported workflow JSON against the current component param classes before loading.
- After version upgrades, migrate old canvases through the UI re-save path.
- In generated configs, derive keys from the param class, not from string literals.
When it happens
Trigger: Calling param update (agent/component/base.py:184) with a config containing keys not declared on the param class — e.g. passing provider params to the wrong component type, or a config saved by an older/newer component version whose param class added/removed fields.
Common situations: Workflow JSON from a different RAGFlow version than the running server (param fields renamed); copy-pasting params between component types; hand-editing params with typos in key names; frontend form serialized with extra metadata keys.
Related errors
- {component_name}: {e}
- Param define nesting too deep!!!, can not parse it
- Please check runtime conf, {} = {} does not match user-param
- {} not supported, should be string type
- does not support empty value.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/d4ff448215fb6d6b.
Report an issue: GitHub.