diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index 36ec055048..86172ae269 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -8,7 +8,6 @@ model_list: litellm_settings: num_retries: 0 - callbacks: ["otel"] router_settings: routing_strategy: usage-based-routing-v2 # 👈 KEY CHANGE diff --git a/litellm/proxy/management_endpoints/internal_user_endpoints.py b/litellm/proxy/management_endpoints/internal_user_endpoints.py index 1cc31a8849..43d8273dee 100644 --- a/litellm/proxy/management_endpoints/internal_user_endpoints.py +++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py @@ -737,13 +737,16 @@ async def user_update( existing_user_row = await prisma_client.db.litellm_usertable.find_first( where={"user_id": data.user_id} ) - if existing_user_row is None: - raise Exception(f"User not found, passed user_id={data.user_id}") - existing_user_row = LiteLLM_UserTable( - **existing_user_row.model_dump(exclude_none=True) - ) + if existing_user_row is not None: + existing_user_row = LiteLLM_UserTable( + **existing_user_row.model_dump(exclude_none=True) + ) - existing_metadata = cast(Dict, getattr(existing_user_row, "metadata", {}) or {}) + existing_metadata = ( + cast(Dict, getattr(existing_user_row, "metadata", {}) or {}) + if existing_user_row is not None + else {} + ) non_default_values = prepare_metadata_fields( data=data,