sgl-project/sglang · warning · HTTPException
Generation is still in-progress
Error message
Generation is still in-progress
What it means
The mesh job exists but has no file_path yet (or the file was deleted from disk), so content download returns HTTP 404 'Generation is still in-progress'. The job record exists but the artifact file is not ready.
Source
Thrown at python/sglang/multimodal_gen/runtime/entrypoints/openai/mesh_api.py:270
@router.get("/{mesh_id}/content")
async def download_mesh_content(
mesh_id: str = Path(...), variant: Optional[str] = Query(None)
):
job = await MESH_STORE.get(mesh_id)
if not job:
raise HTTPException(status_code=404, detail="Mesh not found")
if job.get("url"):
raise HTTPException(
status_code=400,
detail=f"Mesh has been uploaded to cloud storage. Please use the cloud URL: {job.get('url')}",
)
file_path = job.get("file_path")
if not file_path or not os.path.exists(file_path):
raise HTTPException(status_code=404, detail="Generation is still in-progress")
ext = os.path.splitext(file_path)[1].lower()
media_type = {
".glb": "model/gltf-binary",
".obj": "text/plain",
}.get(ext, "application/octet-stream")
return FileResponse(
path=file_path, media_type=media_type, filename=os.path.basename(file_path)
)
View on GitHub (pinned to 0132848349)
Solutions
- Poll GET /{mesh_id} status until completed/failed before requesting content
- Add exponential backoff between content-download attempts
- Inspect job status: if it shows failed, re-submit instead of retrying download
Example fix
# before
resp = await client.get(f"/v1/mesh/{id}/content")
# after
while (job := (await client.get(f"/v1/mesh/{id}")).json())["status"] not in ("completed","failed"):
await asyncio.sleep(2)
resp = await client.get(f"/v1/mesh/{id}/content") Defensive patterns
Strategy: retry
Validate before calling
job = (await client.get(f'/v1/mesh/{id}')).json()
if job['status'] != 'completed': sleep and re-poll Try / catch
while True:
r = await client.get(f'/v1/mesh/{id}/content')
if r.status_code != 404 or 'in-progress' not in r.text: break
await asyncio.sleep(2) Prevention
- Poll job status until terminal state before fetching content
- Back off exponentially
When it happens
Trigger: Polling GET /{mesh_id}/content immediately after job creation, before generation finished and wrote the output file.
Common situations: Impatient polling without backoff; job failed before writing output; artifact cleaned from disk by a janitor process.
Related errors
- Failed to process image source: {str(e)}
- Invalid request body: {e}
- An input image is required for mesh generation
- Mesh not found
- Mesh has been uploaded to cloud storage. Please use the clou
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/2cfbe3bc758cd2c6.
Report an issue: GitHub.