BerriAI/litellm · error · HTTPException

Job {job_id} is already {current.status}

Error message

Job {job_id} is already {current.status}

What it means

Error "Job {job_id} is already {current.status}" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/auto_router_endpoints.py:814

)
async def stop_shadow_eval_job(
    job_id: str,
    user_api_key_dict: Annotated[UserAPIKeyAuth, Depends(user_api_key_auth)],
) -> ShadowEvalJobResponse:
    """Stop an active shadow eval job. Attempts are kept; sampling halts within ~10s."""
    from litellm.proxy.proxy_server import prisma_client

    _require_admin_writer(user_api_key_dict, "stop a shadow eval")
    if prisma_client is None:
        raise HTTPException(status_code=500, detail=CommonProxyErrors.db_not_connected_error.value)
    record: Final = await prisma_client.db.litellm_shadowevaljob.find_unique(
        where={"id": job_id}  # mutable-ok: Prisma filter
    )
    if record is None:
        raise HTTPException(status_code=404, detail=f"No shadow eval job {job_id}")
    current: Final = ShadowEvalJobResponse.model_validate(record, from_attributes=True)
    if current.status != "running":
        raise HTTPException(status_code=400, detail=f"Job {job_id} is already {current.status}")
    updated: Final = await prisma_client.db.litellm_shadowevaljob.update(
        where={"id": job_id},  # mutable-ok: Prisma filter
        data={"stopped_at": datetime.now(timezone.utc)},  # mutable-ok: Prisma payload
    )
    labeled: Final = await _with_key_labels(
        prisma_client, (ShadowEvalJobResponse.model_validate(updated, from_attributes=True),)
    )
    return labeled[0]

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the job's current status; no action is needed since it already has the target status.
  2. Wait for a status transition before issuing the same command again.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/auto_router_endpoints.py:814 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/5730dcf762bc3cbe. Report an issue: GitHub.