BerriAI/litellm · error · HTTPException

Tag {tag.name} not found

Error message

Tag {tag.name} not found

What it means

Tag deletion/update/info path: no LiteLLM tag row exists under the requested tag name, so the operation has nothing to act on and a 404 naming the tag is raised. At-fault input is a tag name that was never created or already deleted.

Source

Thrown at litellm/proxy/management_endpoints/tag_management_endpoints.py:430

    ### BUDGET UPDATE PARAMS ###
    - max_budget: Optional[float] - Max budget for tag
    - tpm_limit: Optional[int] - Max tpm limit for tag
    - rpm_limit: Optional[int] - Max rpm limit for tag
    - max_parallel_requests: Optional[int] - Max parallel requests for tag
    - soft_budget: Optional[float] - Get a slack alert when this soft budget is reached
    - model_max_budget: Optional[dict] - Max budget for a specific model
    - budget_duration: Optional[str] - Frequency of resetting tag budget
    """
    from litellm.proxy.proxy_server import prisma_client

    if prisma_client is None:
        raise HTTPException(status_code=500, detail="Database not connected")

    try:
        # Check if tag exists
        existing_tag: Final = await _table(TagRepository(prisma_client)).find_unique(where={"tag_name": tag.name})
        if existing_tag is None:
            raise HTTPException(status_code=404, detail=f"Tag {tag.name} not found")

        from litellm.proxy.proxy_server import litellm_proxy_admin_name

        # Handle budget updates using common helper
        budget_id: Final = await handle_budget_for_entity(
            data=tag,
            existing_budget_id=existing_tag.budget_id,
            user_api_key_dict=user_api_key_dict,
            prisma_client=prisma_client,
            litellm_proxy_admin_name=litellm_proxy_admin_name,
        )

        # Get model names for model_info
        model_info: Final = await _get_model_names(prisma_client, tag.models or [])

        # Prepare update data
        update_data: Final = {
            "description": tag.description,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Verify the tag name. List tags to find valid names.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/tag_management_endpoints.py:430 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/f6946ee9dfcf02dd. Report an issue: GitHub.