calesthio/OpenMontage · error · RuntimeError
TokenHub submit returned no task id: {data}
Error message
TokenHub submit returned no task id: {data} What it means
Raised when the TokenHub (Hunyuan) task-submission response parses successfully and contains no error, but has no top-level 'id' field. The tool expects the async job id at data.id; without it there is nothing to poll, so it raises RuntimeError embedding the full response body for diagnosis.
Source
Thrown at tools/video/hunyuan_cloud_video.py:434
import requests
body = {
"model": model,
**payload,
}
url = f"https://{_HOST}{_SUBMIT_PATH}"
resp = requests.post(
url,
json=body,
headers=self._auth_headers(api_key),
timeout=30,
)
data = self._json_or_raise(resp)
self._check_response(data)
task_id = data.get("id")
if not task_id:
raise RuntimeError(
f"TokenHub submit returned no task id: {data}"
)
return task_id
def _poll_task(
self,
task_id: str,
*,
model: str,
api_key: str,
poll_interval: float,
timeout_seconds: int,
) -> str:
"""Poll /v1/api/video/query until completion, return video download URL."""
import requests
url = f"https://{_HOST}{_QUERY_PATH}"
View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Read the embedded {data} in the error message to see the actual response shape and locate where the task id lives.
- Check the model string you passed — an unknown/renamed model can produce a non-standard response without a top-level error.
- Update OpenMontage / check for a tool patch if TokenHub changed its response contract.
- Retry once to rule out a transient malformed response.
Defensive patterns
Strategy: try-catch
Try / catch
try:
result = hunyuan_cloud_video(inputs)
except RuntimeError as e:
if "no task id" in str(e):
# contract drift: capture body, do not retry blindly
log_provider_response(str(e))
raise ProviderContractError("TokenHub submit shape changed") from e
raise Prevention
- Pin the OpenMontage version and apply provider-contract patches promptly.
- Verify model ids against current TokenHub docs before shipping workflows.
- Log the full submit response on failure — the body is embedded in the exception.
When it happens
Trigger: POST to the TokenHub submit endpoint returns 200 JSON whose shape differs from expectation — e.g. the API version changed the id field name/location, returned an envelope like {task: {id}}, or returned an empty object.
Common situations: TokenHub API contract drift after a provider update; a different model name routing to a response schema without an id; regional gateway variants with a different envelope; the error field check passing because errors are nested elsewhere.
Related errors
- TokenHub submit returned no task id: {data}
- TokenHub task {task_id} completed but no data.url: {data}
- TokenHub task {task_id} returned unknown status: {status}
- TokenHub task {task_id} did not finish within {timeout_secon
- TokenHub API error: code={code}, message={message}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/16299fbc093d025f.
Report an issue: GitHub.