diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.py index 442ba7a792..a8b81a5332 100644 --- a/litellm/proxy/management_endpoints/key_management_endpoints.py +++ b/litellm/proxy/management_endpoints/key_management_endpoints.py @@ -1273,7 +1273,7 @@ async def generate_key_helper_fn( # noqa: PLR0915 "blocked": blocked, "created_by": created_by, "updated_by": updated_by, - "allowed_routes": allowed_routes, + "allowed_routes": allowed_routes or [], } if (