zylon-ai/private-gpt · error · ValueError
Unsupported streaming provider: {settings.stream.broker}
Error message
Unsupported streaming provider: {settings.stream.broker} What it means
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.
Source
Thrown at private_gpt/components/streaming/stream_component.py:18
from injector import inject, singleton
from private_gpt.components.streaming.providers.stream_service import StreamService
from private_gpt.components.streaming.registry import _PROVIDERS, register_stream
from private_gpt.settings.settings import Settings
__all__ = ["StreamComponent", "register_stream"]
@singleton
class StreamComponent:
stream: StreamService
@inject
def __init__(self, settings: Settings) -> None:
provider = _PROVIDERS.get(settings.stream.broker)
if provider is None:
raise ValueError(
f"Unsupported streaming provider: {settings.stream.broker}"
)
self.stream = provider(settings)
View on GitHub (pinned to 4a030776a3)
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
Example fix
# before stream: broker: kafka # after stream: broker: redis # or the in-memory provider key from registry._PROVIDERS
Defensive patterns
Strategy: type-guard
Validate before calling
from private_gpt.components.streaming.registry import _PROVIDERS
if settings.stream.broker not in _PROVIDERS:
raise ValueError(
f"stream.broker must be one of {sorted(_PROVIDERS)}, "
f"got {settings.stream.broker!r}"
) Type guard
def is_supported_broker(broker: str) -> bool:
from private_gpt.components.streaming.registry import _PROVIDERS
return broker in _PROVIDERS Prevention
- Validate broker against the live registry keys, not a hardcoded list
- Normalize config strings (strip/lower) before comparison
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Unknown scheduler.chat.mode: {mode}
- scheduler.chat.mode={self.scheduler.chat.mode!r} requires st
- Default LLM model '{model_id}' could not be initialized: {e}
- Default model '{self._default_model_id}' not found in regist
- No model specified and no models are configured
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/2b66c3f05410626a.
Report an issue: GitHub.