sgl-project/sglang · error · ValueError
composite_input event payload requires non-empty input_types
Error message
composite_input event payload requires non-empty input_types
What it means
Validation in the LingBot world realtime adapter: a composite_input payload must declare a non-empty input_types list describing which modalities it carries. An empty list leaves the composite input uninterpretable.
Solutions
- Always include input_types: ["prompt"] (or with camera types) in every composite_input payload
- Make input_types mirror exactly the keys you actually send
- Validate the payload structure client-side before send
Example fix
// before
{input_types: [], prompt: "hi"}
// after
{input_types: ["prompt"], prompt: "hi"} Defensive patterns
Strategy: validation
Validate before calling
types_ = payload.setdefault('input_types', ['prompt'])
assert isinstance(types_, list) and types_ Type guard
def has_input_types(x: dict) -> bool: return isinstance(x.get('input_types'), list) and len(x['input_types']) > 0 Prevention
- Never omit input_types in composite_input
- Keep a payload-builder helper that inserts it automatically
When it happens
Trigger: {kind: "composite_input", payload: {prompt: "hi"}} — payload is a map but omits input_types, or sets it to [] or a string.
Common situations: Client assuming the adapter infers types from present keys; refactoring that drops the input_types field.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- composite_input event payload requires
- composite_input event payload must be a map
- composite_input input_types must contain non-empty strings
- unsupported composite_input type
- camera_actions event payload must be list[list[str]]
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/c396d46d9c096d92.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/entrypoints/openai/realtime/adapters/lingbot_world_realtime_adapter.py:197
return f"kind=prompt, prompt_len={len(prompt)}"
@staticmethod
def _validate_prompt_payload(payload: Any) -> str:
if not isinstance(payload, str) or not payload:
raise ValueError("prompt event payload must be a non-empty string")
return payload
def _ingest_composite_input(
self,
state: LingBotWorldRealtimeState,
payload: Any,
event_id: int | None,
) -> str:
if not isinstance(payload, dict):
raise ValueError("composite_input event payload must be a map")
input_types = payload.get("input_types")
if not isinstance(input_types, list) or not input_types:
raise ValueError(
"composite_input event payload requires non-empty input_types"
)
parsed_inputs = []
for input_type in input_types:
if not isinstance(input_type, str) or not input_type:
raise ValueError(
"composite_input input_types must contain non-empty strings"
)
if input_type not in payload:
raise ValueError(f"composite_input event payload requires {input_type}")
parsed_inputs.append(
(
input_type,
self._parse_composite_input_item(
state,
input_type,
payload[input_type],View on GitHub (pinned to 0132848349)