{"record":{"id":"a2d642018fed938d","repo":"deepset-ai/haystack","slug":"unknown-components-in-streaming-components-sorte","errorCode":null,"errorMessage":"Unknown components in streaming_components: {sorted(unknown)}","messagePattern":"Unknown components in streaming_components: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/pipeline.py","lineNumber":1301,"sourceCode":"        :raises PipelineRuntimeError:\n            Surfaced during iteration. If the Pipeline contains cycles with unsupported connections that would cause\n            it to get stuck and fail running, or if a Component fails or returns output in an unsupported type.\n        :raises PipelineMaxComponentRuns:\n            Surfaced during iteration. If a Component reaches the maximum number of times it can be run in this\n            Pipeline.\n        \"\"\"\n        streaming_capable = {\n            name\n            for name in self.graph.nodes\n            if getattr(self.graph.nodes[name][\"instance\"], \"__haystack_supports_async__\", False)\n            and \"streaming_callback\" in self.graph.nodes[name][\"instance\"].__haystack_input__\n        }\n        if streaming_components is not None:\n            requested = set(streaming_components)\n            unknown = requested - set(self.graph.nodes)\n            non_streaming = requested - unknown - streaming_capable\n            if unknown:\n                raise ValueError(f\"Unknown components in streaming_components: {sorted(unknown)}\")\n            if non_streaming:\n                raise ValueError(f\"These components do not support streaming: {sorted(non_streaming)}\")\n\n        queue: asyncio.Queue[StreamingChunk | _EndOfStream] = asyncio.Queue()\n\n        def make_forwarder(user_callback: StreamingCallbackT | None) -> AsyncStreamingCallbackT:\n            async def forwarder(chunk: StreamingChunk) -> None:\n                await queue.put(chunk)\n                if user_callback is not None:\n                    await _invoke_streaming_callback(user_callback, chunk)\n\n            return forwarder\n\n        new_data: dict[str, Any] = self._prepare_component_input_data(data)\n        for name in streaming_capable:\n            if streaming_components is not None and name not in streaming_components:\n                continue\n            instance = self.graph.nodes[name][\"instance\"]","sourceCodeStart":1283,"sourceCodeEnd":1319,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/pipeline.py#L1283-L1319","documentation":"Pipeline.stream validates the streaming_components list (pipeline.py:1301): every name must correspond to a node in the pipeline graph. A ValueError listing the unknown names is raised before streaming starts. This catches typos and components added under different names.","triggerScenarios":"pipe.stream(data, streaming_components=[\"chatgenerator\"]) when the component was added as \"llm\"; stale names after renaming a component or refactoring the pipeline.","commonSituations":"Case-sensitivity mistakes in component names; hard-coded component names in config that no longer match add_component() names; copying examples with different component names.","solutions":["Use exact component names as passed to pipeline.add_component().","List pipeline.graph.nodes (or the component sockets) to discover valid names at runtime.","Filter the requested list against set(pipe.graph.nodes) before calling stream."],"exampleFix":"# before\nstream = pipe.stream(data, streaming_components=[\"gpt\"])\n# after\nnames = [n for n in [\"gpt\"] if n in pipe.graph.nodes]\nstream = pipe.stream(data, streaming_components=names)\n","handlingStrategy":"validation","validationCode":"valid = set(pipe.graph.nodes)\nrequested = set(streaming_components or [])\nunknown = requested - valid\nif unknown:\n    raise ValueError(f'fix names: {sorted(unknown)}')","typeGuard":null,"tryCatchPattern":"try:\n    stream = pipe.stream(data, streaming_components=names)\nexcept ValueError as e:\n    if 'Unknown components' in str(e):\n        print(e)  # message lists the offending names sorted","preventionTips":["Derive component names from the same constants used in add_component().","Print pipe.graph.nodes when building streaming_components dynamically.","Watch case sensitivity in component names."],"tags":["pipeline","streaming","validation","argument-error"],"backgroundTag":"unknown-component-name","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}