BerriAI/litellm · error · HTTPException

Failed to update policy for tool '{data.tool_name}'

Error message

Failed to update policy for tool '{data.tool_name}'

What it means

Error "Failed to update policy for tool '{data.tool_name}'" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/tool_management_endpoints.py:678

                team_id=data.team_id,
                key_hash=data.key_hash,
            )

        if data.input_policy is None and data.output_policy is None:
            raise HTTPException(
                status_code=400,
                detail="At least one of input_policy or output_policy must be provided",
            )

        updated: Final = await db_update_tool_policy(
            prisma_client=prisma_client,
            tool_name=data.tool_name,
            updated_by=user_api_key_dict.user_id,
            input_policy=data.input_policy,
            output_policy=data.output_policy,
        )
        if updated is None:
            raise HTTPException(
                status_code=500,
                detail=f"Failed to update policy for tool '{data.tool_name}'",
            )
        registry = get_tool_policy_registry()
        if registry.is_initialized():
            await registry.sync_tool_policy_from_db(prisma_client)
        return ToolPolicyUpdateResponse(
            tool_name=updated.tool_name,
            input_policy=updated.input_policy,
            output_policy=updated.output_policy,
            updated=True,
        )
    except HTTPException:
        raise
    except Exception as e:
        verbose_proxy_logger.exception("Error updating tool policy: %s", e)
        raise HTTPException(status_code=500, detail=str(e))

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Verify the tool name exists, check proxy logs for the failure, then retry.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/tool_management_endpoints.py:678 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/1f311341e798764e. Report an issue: GitHub.