{"record":{"id":"2b66c3f05410626a","repo":"zylon-ai/private-gpt","slug":"unsupported-streaming-provider-settings-stream-b","errorCode":null,"errorMessage":"Unsupported streaming provider: {settings.stream.broker}","messagePattern":"Unsupported streaming provider: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"private_gpt/components/streaming/stream_component.py","lineNumber":18,"sourceCode":"from injector import inject, singleton\n\nfrom private_gpt.components.streaming.providers.stream_service import StreamService\nfrom private_gpt.components.streaming.registry import _PROVIDERS, register_stream\nfrom private_gpt.settings.settings import Settings\n\n__all__ = [\"StreamComponent\", \"register_stream\"]\n\n\n@singleton\nclass StreamComponent:\n    stream: StreamService\n\n    @inject\n    def __init__(self, settings: Settings) -> None:\n        provider = _PROVIDERS.get(settings.stream.broker)\n        if provider is None:\n            raise ValueError(\n                f\"Unsupported streaming provider: {settings.stream.broker}\"\n            )\n        self.stream = provider(settings)\n","sourceCodeStart":1,"sourceCodeEnd":22,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/streaming/stream_component.py#L1-L22","documentation":"Raised by StreamComponent.__init__ when settings.stream.broker has no entry in the _PROVIDERS registry. The component resolves the broker string to a provider callable at injection time; an unknown value means no StreamService can be constructed, so startup fails immediately with the offending broker name in the message.","triggerScenarios":"Setting stream.broker to anything other than a registered provider key (e.g. \"kafka\", \"rabbitmq\", \"Redis\" with wrong casing, or a broker removed in a version upgrade).","commonSituations":"Copy-pasting config from another project's messaging stack; case-sensitivity mistakes; upgrading private-gpt and a broker name was renamed or dropped from _PROVIDERS.","solutions":["Set stream.broker to a supported value — check the keys of _PROVIDERS in private_gpt/components/streaming/registry.py (e.g. the in-memory and redis providers)","Check casing/whitespace in the YAML value (values are matched exactly)","If you need a custom broker, register a provider function in _PROVIDERS before the component is instantiated"],"exampleFix":"# before\nstream:\n  broker: kafka\n# after\nstream:\n  broker: redis   # or the in-memory provider key from registry._PROVIDERS","handlingStrategy":"type-guard","validationCode":"from private_gpt.components.streaming.registry import _PROVIDERS\n\nif settings.stream.broker not in _PROVIDERS:\n    raise ValueError(\n        f\"stream.broker must be one of {sorted(_PROVIDERS)}, \"\n        f\"got {settings.stream.broker!r}\"\n    )","typeGuard":"def is_supported_broker(broker: str) -> bool:\n    from private_gpt.components.streaming.registry import _PROVIDERS\n    return broker in _PROVIDERS","tryCatchPattern":null,"preventionTips":["Validate broker against the live registry keys, not a hardcoded list","Normalize config strings (strip/lower) before comparison"],"tags":["streaming","configuration","unsupported-provider","startup"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}