BerriAI/litellm · error · Exception

model_info.id not provided

Error message

model_info.id not provided

What it means

Generic sentinel guard in the proxy's model update endpoint (/model/update). The request body was accepted and deserialized, but its model_info object has no id field, so the endpoint cannot identify which deployment in the DB or router to update. Fires when a client PATCHes/POSTs a model with model_params lacking model_info.id. Fix by including model_info.id in the request payload.

Source

Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1923

    )

    try:
        if prisma_client is None:
            raise HTTPException(
                status_code=500,
                detail={
                    "error": "No DB Connected. Here's how to do it - https://docs.litellm.ai/docs/proxy/virtual_keys"
                },
            )

        _model_id: str | None = None
        _model_info: Final = getattr(model_params, "model_info", None)
        if _model_info is None:
            raise Exception("model_info not provided")

        _model_id = _model_info.id
        if _model_id is None:
            raise Exception("model_info.id not provided")

        _existing_litellm_params = await ModelRepository(prisma_client).table.find_unique(where={"model_id": _model_id})

        if _existing_litellm_params is None:
            if llm_router is not None and llm_router.get_deployment(model_id=_model_id) is not None:
                raise HTTPException(
                    status_code=400,
                    detail={"error": "Can't edit model. Model in config. Store model in db via `/model/new`. to edit."},
                )
            else:
                raise Exception("model not found")
        deployment: Final = Deployment(**_existing_litellm_params.model_dump())

        await ModelManagementAuthChecks.can_user_make_model_call(
            model_params=deployment,
            user_api_key_dict=user_api_key_dict,
            prisma_client=prisma_client,
            premium_user=premium_user,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Include model_info.id in the request body.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1923 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/d9547a76d7a1acdb. Report an issue: GitHub.