sgl-project/sglang · error · ValueError

unsupported composite_input type

Error message

unsupported composite_input type: {input_type}

What it means

Validation in the LingBot world realtime adapter: the composite input contains an input_type the adapter cannot handle. Extend the adapter's type handlers or drop the unsupported modality from input_types.

Solutions

  1. Restrict input_types entries to 'prompt' and the camera control types the state supports
  2. Check the adapter's parse branch for the exact accepted names
  3. Upgrade or patch the adapter if you need a new modality, don't just send it

Example fix

// before
{input_types: ["text"], text: "hi"}
// after
{input_types: ["prompt"], prompt: "hi"}
Defensive patterns

Strategy: validation

Validate before calling

SUPPORTED = {'prompt'} | CAMERA_TYPES
payload['input_types'] = [t for t in payload['input_types'] if t in SUPPORTED]

Type guard

def is_supported_type(t: str) -> bool: return t == 'prompt' or t in CAMERA_TYPES

Try / catch

except ValueError as e: if 'unsupported composite_input type' in str(e): drop the item and resend

Prevention

When it happens

Trigger: input_types: ["image"] or any undeclared type name — the per-item parser (_parse_composite_input_item) has no branch for it.

Common situations: Client assuming arbitrary modality names are supported; adapter version lacking a newer input type; typos in type names like 'promt'.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/fd37cbbbcbcb4d07. Report an issue: GitHub.

Appendix: source

Thrown at python/sglang/multimodal_gen/runtime/entrypoints/openai/realtime/adapters/lingbot_world_realtime_adapter.py:247

                )
            )
        return f"kind=composite_input, inputs={input_logs}"

    def _parse_composite_input_item(
        self,
        state: LingBotWorldRealtimeState,
        input_type: str,
        payload: Any,
        event_id: int | None,
    ) -> Any:
        if input_type == "camera_actions":
            return state.parse_camera_control_event_payload(
                payload,
                event_id=event_id,
            )
        if input_type == "prompt":
            return self._validate_prompt_payload(payload)
        raise ValueError(f"unsupported composite_input type: {input_type}")

    def _ingest_parsed_composite_input_item(
        self,
        state: LingBotWorldRealtimeState,
        input_type: str,
        parsed_payload: Any,
        event_id: int | None,
    ) -> str:
        if input_type == "camera_actions":
            return state.receive_parsed_camera_control_event_payload(
                parsed_payload,
                event_id=event_id,
            )
        if input_type == "prompt":
            state.receive_prompt(parsed_payload, event_id=event_id)
            return f"kind=prompt, prompt_len={len(parsed_payload)}"
        raise ValueError(f"unsupported composite_input type: {input_type}")

View on GitHub (pinned to 0132848349)