calesthio/OpenMontage · error · ValueError
web_search is supported only for pure text input
Error message
web_search is supported only for pure text input
What it means
Raised when web_search is enabled but the built content array has more than one element, i.e. the request contains any reference media alongside the prompt. Ark's web_search tool only works on a pure text prompt, so combining it with images/videos/audio is rejected client-side.
Source
Thrown at tools/video/seedance_ark.py:881
)
content.extend(
self._image_content(ref, role="reference_image") for ref in image_refs
)
content.extend(
{
"type": "video_url",
"video_url": {"url": str(ref)},
"role": "reference_video",
}
for ref in video_refs
)
content.extend(
self._audio_content(ref, role="reference_audio") for ref in audio_refs
)
if inputs.get("web_search") and len(content) != 1:
raise ValueError("web_search is supported only for pure text input")
payload: dict[str, Any] = {
"model": model,
"content": content,
"duration": duration,
"ratio": ratio,
"resolution": resolution,
"generate_audio": bool(inputs.get("generate_audio", True)),
"watermark": bool(inputs.get("watermark", False)),
"return_last_frame": bool(inputs.get("return_last_frame", False)),
}
optional = (
"callback_url",
"execution_expires_after",
"priority",
"safety_identifier",
)
for key in optional:View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Remove web_search from media-conditioned requests
- Keep web_search only for pure text_to_video with a prompt and no media
- Do retrieval yourself, inject findings into the prompt, and keep media refs without web_search
Example fix
# before
inputs = {"operation": "image_to_video", "reference_image_url": a,
"web_search": True}
# after
inputs = {"operation": "image_to_video", "reference_image_url": a} Defensive patterns
Strategy: validation
Validate before calling
if inputs.get("web_search"):
assert inputs.get("operation") in (None, "text_to_video"), "web_search is text-only"
assert not has_media(inputs), "web_search forbids reference media"
inputs.pop("end_image_url", None); inputs.pop("end_image_path", None) Type guard
def web_search_compatible(inputs: dict) -> bool:
if not inputs.get("web_search"):
return True
return not has_media(inputs) and not inputs.get("end_image_url") and not inputs.get("end_image_path") Prevention
- Enable web_search only on the pure text_to_video path
- Do retrieval externally and enrich the prompt instead
When it happens
Trigger: inputs.web_search truthy together with any reference media (image_to_video refs, reference_to_video refs, or end frames), making len(content) > 1.
Common situations: Reusing a web_search config across all operations; wanting 'grounded' image-to-video and assuming search plus a first frame is allowed.
Related errors
- text_to_video does not accept reference media; use image_to_
- image_to_video requires exactly one reference image
- provide only one of end_image_url/end_image_path
- reference_to_video requires at least one image or video
- duration must be an integer from 4 to {max_seconds} or -1
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/0f1249cc46ce793e.
Report an issue: GitHub.