sgl-project/sglang · error · ValueError
Dots note omni requires a text prompt for multimodal request
Error message
Dots note omni requires a text prompt for multimodal requests
What it means
Raised by process_mm_data_async when a multimodal request (image/audio/video data present) has a non-string input_text (e.g. a chat-messages list). The Dots Note Omni processor requires the already-rendered text prompt.
Source
Thrown at python/sglang/srt/multimodal/processors/dots_note_omni.py:388
pass
return "".join(rendered), ordered_images, ordered_audios
async def process_mm_data_async(
self,
input_text: list[int] | str,
request_obj: GenerateReqInput,
max_req_input_len: int,
*args,
image_data: list | None = None,
audio_data: list | None = None,
video_data=None,
**kwargs,
):
video_data = request_obj.video_data or video_data
if not image_data and not audio_data and not video_data:
return None
if not isinstance(input_text, str):
raise ValueError( # noqa: TRY004 - preserve the processor API contract
"Dots note omni requires a text prompt for multimodal requests"
)
request_videos = len(video_data) if video_data else 0
request_images = len(image_data) if image_data else 0
request_audios = len(audio_data) if audio_data else 0
logger.info(
"[dots_mm] rid=%s request videos=%d images=%d audios=%d",
request_obj.rid,
request_videos,
request_images,
request_audios,
)
if video_data:
video_config = dict(request_obj.video_config or {})
question = video_config.pop("_question", "") or ""
seq = video_config.pop("seq", 131072)View on GitHub (pinned to 0132848349)
Solutions
- Pre-render your chat template client-side and pass the resulting string as input_text
- Or use the endpoint/flow intended for this model so text reaches the processor as a str
- If building requests programmatically, assert isinstance(text, str) before attaching media
Example fix
// before
input_text = [{"role": "user", "content": "describe this"}]
// after
input_text = "<|user|>\ndescribe this<|end|>" # rendered string Defensive patterns
Strategy: type-guard
Validate before calling
assert isinstance(input_text, str) and input_text, 'render chat template to a string before attaching media'
Type guard
def is_rendered_prompt(text) -> bool:
return isinstance(text, str) and len(text) > 0 Prevention
- Render chat templates client-side for this model
- Never pass raw message lists when media is attached
When it happens
Trigger: Calling the /generate-style API with image_data/video_data set while passing input_text as a list of chat messages instead of a string; the processor checks isinstance(input_text, str) right after detecting mm data.
Common situations: Using the OpenAI-compatible chat endpoint path where text arrives unrendered, or passing {'text': [...messages...]} in a raw request with media attached.
Related errors
- seq must be positive, got {seq}
- max_new_tokens must be non-negative, got {max_new_tokens}
- max_new_tokens must leave room for input: max_new_tokens={ma
- audio_cap must be non-negative, got {audio_cap}
- audio_sr must be positive, got {audio_sr}
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/b5bbf365fff6200f.
Report an issue: GitHub.