{"record":{"id":"96a7fe70651f9dd5","repo":"deepset-ai/haystack","slug":"component-named-component-name-not-found-in-t","errorCode":null,"errorMessage":"Component named '${component_name}' not found in the pipeline.","messagePattern":"Component named '(.+?)' not found in the pipeline\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":1145,"sourceCode":"        \"\"\"\n        Validates pipeline input data.\n\n        Validates that data:\n        * Each Component name actually exists in the Pipeline\n        * Each Component is not missing any input\n        * Each Component has only one input per input socket, if not variadic\n        * Each Component doesn't receive inputs that are already sent by another Component\n\n        :param data:\n            A dictionary of inputs for the pipeline's components. Each key is a component name.\n\n        :raises ValueError:\n            If inputs are invalid according to the above.\n        \"\"\"\n        for component_name, component_inputs in data.items():\n            # Check that the component exists\n            if component_name not in self.graph.nodes:\n                raise ValueError(f\"Component named '{component_name}' not found in the pipeline.\")\n            # Check that no input is provided that the component can't accept\n            instance = self.graph.nodes[component_name][\"instance\"]\n            for input_name in component_inputs.keys():\n                if input_name not in instance.__haystack_input__._sockets_dict:\n                    raise ValueError(f\"Input '{input_name}' not found in component '{component_name}'.\")\n\n        for component_name in self.graph.nodes:\n            instance = self.graph.nodes[component_name][\"instance\"]\n            for socket_name, socket in instance.__haystack_input__._sockets_dict.items():\n                component_inputs = data.get(component_name, {})\n                # Check that no mandatory input is missing for any component in the pipeline\n                if socket.senders == [] and socket.is_mandatory and socket_name not in component_inputs:\n                    raise ValueError(f\"Missing mandatory input '{socket_name}' for component '{component_name}'.\")\n\n                # Check if an input is provided more than once for non-variadic sockets\n                if socket.senders and socket_name in component_inputs:\n                    self._make_socket_auto_variadic(\n                        component_name=component_name, receiver_socket=socket, error_type=ValueError","sourceCodeStart":1127,"sourceCodeEnd":1163,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L1127-L1163","documentation":"Pipeline.validate_input() (invoked by run()/run_async_generator()) raises ValueError when a top-level key in the run data dict is not a component in the pipeline. Inputs are keyed by component name; an unknown key means either a typo or input intended for a component that isn't in this pipeline.","triggerScenarios":"pipeline.run({'component_name': {'input': value}}) where 'component_name' is misspelled, was removed from the pipeline, or the caller mixed up component names and input parameter names.","commonSituations":"Passing run inputs flat (run({'prompt': ...})) instead of nested per-component; renaming a component in add_component but not updating run() call sites; building inputs dynamically from config with stale names.","solutions":["Key run() inputs by exact component name: pipeline.run({'comp': {'input': value}})","Check the component names via pipeline.list_component_names() and fix the data dict keys","If the component was removed/renamed, update the run() inputs accordingly"],"exampleFix":"// before\npipeline.run({'question': 'What is AI?'})\n// after\npipeline.run({'prompt_builder': {'question': 'What is AI?'}})","handlingStrategy":"validation","validationCode":"names = pipeline.list_component_names()\nfor comp_name in data.keys():\n    assert comp_name in names, f\"run() key {comp_name!r} is not a component; available: {names}\"","typeGuard":"def run_inputs_valid(pipeline, data: dict) -> bool:\n    names = pipeline.list_component_names()\n    return all(k in names for k in data)","tryCatchPattern":"try:\n    result = pipeline.run(data)\nexcept ValueError as e:\n    if 'not found in the pipeline' in str(e):\n        logger.error('%s; components: %s', e, pipeline.list_component_names())","preventionTips":["Remember run() inputs are nested per component: {'comp': {'param': value}}","Keep run() input dicts built from the same name constants used in add_component","Update run() call sites whenever component names change"],"tags":["pipeline","haystack","run-inputs","valueerror"],"backgroundTag":"pipeline-component-not-found","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}