{"record":{"id":"7ff98ecb5de6ce9b","repo":"deepset-ai/haystack","slug":"input-input-name-not-found-in-component-co","errorCode":null,"errorMessage":"Input '${input_name}' not found in component '${component_name}'.","messagePattern":"Input '(.+?)' not found in component '(.+?)'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":1150,"sourceCode":"        * 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\n                    )\n\n    def _make_socket_auto_variadic(\n        self, component_name: str, receiver_socket: InputSocket, error_type: type[Exception]\n    ) -> InputSocket:","sourceCodeStart":1132,"sourceCodeEnd":1168,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L1132-L1168","documentation":"Pipeline.validate_input() raises this ValueError when a component is given an input key that does not match any of its declared input sockets (checked via instance.__haystack_input__._sockets_dict). The pipeline rejects unknown kwargs before running any component, because inputs are matched to typed sockets and there is nowhere to route a name the component never declared.","triggerScenarios":"Calling pipeline.run({\"component\": {\"wrong_kwarg\": value}}) or connect/execute paths where the component_inputs dict passed to validate_input contains a key not in the component's input sockets; also happens after renaming a component input without updating the caller's input dict.","commonSituations":"Typo in an input name (e.g. 'query' vs 'question'); passing extra inputs to a component whose API changed between haystack versions; feeding kwargs of one component (e.g. OpenAIChatGenerator) to another (e.g. HuggingFaceLocalGenerator); programmatic construction of input dicts with stale keys.","solutions":["Inspect the component's declared inputs: print the component's __haystack_input__ sockets or check its run() signature, and correct the input key in the dict passed to pipeline.run().","If the component API changed after a haystack upgrade, update the call site to the new input names (check the component's release notes/migration guide).","If the key is genuinely needed, add it to the component by declaring a new @component.input socket in the component definition."],"exampleFix":"// before\npipeline.run({\"retriever\": {\"query_text\": \"hello\"}})\n# after (Retriever's socket is named 'query')\npipeline.run({\"retriever\": {\"query\": \"hello\"}})","handlingStrategy":"validation","validationCode":"comp = pipeline.get_component(\"retriever\")\ninputs = comp.__haystack_input__._sockets_dict.keys()\nbad = set(my_inputs) - set(inputs)\nassert not bad, f\"Unknown inputs for retriever: {bad}\"","typeGuard":"def has_valid_inputs(name: str, inputs: dict) -> bool:\n    comp = pipeline.get_component(name)\n    return set(inputs) <= set(comp.__haystack_input__._sockets_dict)","tryCatchPattern":"try:\n    result = pipeline.run(data)\nexcept ValueError as e:\n    logger.error(\"Invalid pipeline inputs: %s\", e)","preventionTips":["Keep input dict keys in sync with each component's run() signature","After haystack upgrades, re-check component input names","Centralize pipeline input construction in one typed helper"],"tags":["haystack","pipeline","validation","valueerror"],"backgroundTag":"unknown-input-key","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}