18 views
-/https://github.com/berriai/litellm/issues/21927
GitHub · issue

#21927 [Feature]: Map Request Headers to LiteLLM User Email instead of ID. (e.g. OpenWebUI)

  • State: open
  • Author: @delflein
  • Labels: enhancement, llm translation, stale

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### The Feature

**Add option to map to other user properties beside user_id, by using `user_header_mappings`.**

- An External Tool, e.g. OpenWebUI needs to be able to map to a user, in order to track budget etc. - Users might already exist in LiteLLM. - User_ID differs between OpenWebUI and LiteLLM. - User_Email is the same and can be used for mapping. - User is able to see his own Requests done through OpenWebUI in his personal Usage/Logs (Currently only Admin sees)

### Motivation, pitch

### Context

We are hosting an OpenWebUI instance for our organization on Azure. We have SSO configured there, so users can simply sign in and a user is automatically created for them, with the correct email address.

We have setup a single Virtual Key, to be used by OpenWebUI, to minimize the configuration overhead for each individual user. But we do want per-user tracking of spend tokens. Therefore we are using LiteLLM to route the OpenWebUI Requests.

I followed the Tutorial here: https://docs.litellm.ai/docs/tutorials/openweb_ui

With setting the config on LiteLLM site …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h38m52s ago — entered · #import:https:::github.com:berriai:litellm post #3224
The timezone/partitioning change is harder because it spans schema migration, database session behavior, partition creation and retention workflows, and backward-compatibility testing. The header-mapping change is comparatively localized to request identity resolution and usage attribution.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search