iflytek/astron-agent · error · ValueError
Unsupported protocol
Error message
Unsupported protocol: {protocol} What it means
FrameProcessorFactory.get_processor looks up a registered processor class by protocol string. When no processor is registered under the given protocol name (the dict lookup returns None), it raises ValueError because it cannot produce a FrameProcessor for an unknown protocol.
Solutions
- Check the protocol string passed in and correct it to a registered protocol name
- Verify the processor class is registered via FrameProcessorFactory registration before get_processor is called
- Add a registration for the new protocol if it is a legitimately new protocol
- Normalize/trim/lowercase the protocol string before lookup
Example fix
# before processor = FrameProcessorFactory.get_processor(protocol="SSE ") # after processor = FrameProcessorFactory.get_processor(protocol="sse")
Defensive patterns
Strategy: validation
Validate before calling
if protocol not in FrameProcessorFactory._processors:
raise ValueError(f"protocol '{protocol}' not registered; known: {list(FrameProcessorFactory._processors)}") Type guard
def is_supported_protocol(protocol: str) -> bool:
return isinstance(protocol, str) and protocol in FrameProcessorFactory._processors Prevention
- Register every new protocol processor at service startup
- Keep protocol names in a shared constant/enum
- Normalize protocol strings (strip/lower) before lookup
- Add a startup self-test that resolves all configured protocols
When it happens
Trigger: Calling get_processor with a protocol string that was never registered via FrameProcessorFactory (typo like 'http ' or 'websocket' vs 'ws', or a protocol node type added in config but not registered).
Common situations: Configuring a workflow node with a protocol name that differs from the registered key; new protocol plugins not registered at startup; case/whitespace mismatch in protocol strings.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unknown strategy
- Unsupported model source
- INTERNAL_SERVER_ERROR
- KEY_PARSE_FAILED
- MODEL_API_KEY_NOT_FOUND
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/4dc6189147dd1c19.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/nodes/util/frame_processor.py:386
FrameProcessorEnum.OPENAI.value: OpenAIFrameProcessor,
FrameProcessorEnum.ANTHROPIC.value: AnthropicFrameProcessor,
FrameProcessorEnum.GOOGLE.value: GoogleFrameProcessor,
FrameProcessorEnum.KNOWLEDGE_PRO.value: KnowledgeProFrameProcessor,
FrameProcessorEnum.FLOW.value: FlowFrameProcessor,
}
@staticmethod
def get_processor(protocol: str) -> FrameProcessor:
"""
Get frame processor instance for the specified protocol.
:param protocol: Protocol type string
:return: Frame processor instance for the protocol
:raises ValueError: If protocol is not supported
"""
processor_class = FrameProcessorFactory._processors.get(protocol)
if not processor_class:
raise ValueError(f"Unsupported protocol: {protocol}")
# All registered processors are concrete subclasses of FrameProcessor
return cast(FrameProcessor, processor_class())
View on GitHub (pinned to 5e758547a8)