{"record":{"id":"16299fbc093d025f","repo":"calesthio/OpenMontage","slug":"tokenhub-submit-returned-no-task-id-data-16299f","errorCode":null,"errorMessage":"TokenHub submit returned no task id: {data}","messagePattern":"TokenHub submit returned no task id: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/video/hunyuan_cloud_video.py","lineNumber":434,"sourceCode":"        import requests\n\n        body = {\n            \"model\": model,\n            **payload,\n        }\n        url = f\"https://{_HOST}{_SUBMIT_PATH}\"\n        resp = requests.post(\n            url,\n            json=body,\n            headers=self._auth_headers(api_key),\n            timeout=30,\n        )\n        data = self._json_or_raise(resp)\n        self._check_response(data)\n\n        task_id = data.get(\"id\")\n        if not task_id:\n            raise RuntimeError(\n                f\"TokenHub submit returned no task id: {data}\"\n            )\n        return task_id\n\n    def _poll_task(\n        self,\n        task_id: str,\n        *,\n        model: str,\n        api_key: str,\n        poll_interval: float,\n        timeout_seconds: int,\n    ) -> str:\n        \"\"\"Poll /v1/api/video/query until completion, return video download URL.\"\"\"\n        import requests\n\n        url = f\"https://{_HOST}{_QUERY_PATH}\"\n","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/hunyuan_cloud_video.py#L416-L452","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = hunyuan_cloud_video(inputs)\nexcept RuntimeError as e:\n    if \"no task id\" in str(e):\n        # contract drift: capture body, do not retry blindly\n        log_provider_response(str(e))\n        raise ProviderContractError(\"TokenHub submit shape changed\") from e\n    raise","preventionTips":["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."],"tags":["hunyuan","tokenhub","api-contract","response-shape","async-jobs"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}