#14505 [Feature]: Pass immutable safety identifiers (user_ids) by default
### The Feature
Problem: • Teams can override or omit user_id fields in API calls. • This creates gaps in safety tracking and attribution. • Security/compliance frameworks often require immutable attribution of requests.
Proposed Solution: • LITELLM_ENFORCE_SAFETY_IDENTIFIER = TRUE should automatically attach a safety_identifier (user_id) to every request. • This value should be sourced from a trusted context (e.g., LiteLLM’s internal auth/session/user object). • Teams/users should not be able to override or modify this value in their request payloads. • Identifier should be passed downstream to providers in the most appropriate param (e.g., safety_identifier, user_id, metadata, or x-litellm-user-id header).
### Motivation, pitch
Description: Currently, LiteLLM allows teams/users to configure and send request parameters, including a safety_identifier to some providers, but there’s no mechanism to guarantee that a safety identifier (e.g., user_id) is always attached to requests and cannot be altered by teams or end-users. This is important for auditing, abuse detection, and regulatory compliance.
### LiteLLM is hiring a founding backend engineer, are you interested in j…