BerriAI/litellm · error · Exception
LiteLLM Managed with id= not found
Error message
LiteLLM Managed {self.resource_type} with id={unified_resource_id} not found What it means
Error "LiteLLM Managed {self.resource_type} with id={unified_resource_id} not found" thrown in BerriAI/litellm.
Solutions
- Verify the resource id exists: list managed resources of this type and use a valid unified_resource_id.
- Ensure the resource was created through the LiteLLM managed resource API and not deleted.
- Check for typos in the resource id passed in the request.
When it happens
Trigger: Thrown at litellm/llms/base_llm/managed_resources/base_managed_resource.py:270 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/1481003b201524e5.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/base_llm/managed_resources/base_managed_resource.py:270
unified_resource_id: str,
litellm_parent_otel_span: Span | None = None,
) -> ResourceObjectType | None:
"""
Delete unified resource from cache and database.
Args:
unified_resource_id: The unified resource ID to delete
litellm_parent_otel_span: OpenTelemetry span for tracing
Returns:
The deleted resource object or None if not found
"""
# Get old value from database
table: Final = getattr(self.prisma_client.db, self.table_name)
initial_value: Final = await table.find_first(where={"unified_resource_id": unified_resource_id})
if initial_value is None:
raise Exception(f"LiteLLM Managed {self.resource_type} with id={unified_resource_id} not found")
# Delete from cache
await self.internal_usage_cache.async_set_cache(
key=unified_resource_id,
value=None,
litellm_parent_otel_span=litellm_parent_otel_span,
)
# Delete from database
await table.delete(where={"unified_resource_id": unified_resource_id})
return initial_value.resource_object
async def can_user_access_unified_resource_id(
self,
unified_resource_id: str,
user_api_key_dict: UserAPIKeyAuth,
litellm_parent_otel_span: Span | None = None,View on GitHub (pinned to 77b7c6c40c)