Docs update on user header mapping (#14527)

This commit is contained in:
Boopesh Shanmugam 2025-09-13 16:58:10 -07:00 committed by GitHub
parent 6172145014
commit 95da14cb96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,16 +89,20 @@ To track spend and usage for each Open WebUI user, configure both Open WebUI and
2. **Configure LiteLLM to Parse User Headers**
Add the following to your LiteLLM `config.yaml` to specify a header to use for user tracking:
Add the following to your LiteLLM `config.yaml` to specify the request header mapping for user tracking:
```yaml
general_settings:
user_header_name: X-OpenWebUI-User-Id
user_header_mappings:
- header_name: X-OpenWebUI-User-Id
litellm_user_role: internal_user
- header_name: X-OpenWebUI-User-Email
litellm_user_role: customer
```
ⓘ Available tracking options
You can use any of the following headers for `user_header_name`:
You can use any of the following headers in `header_name` in `user_header_mappings` :
- `X-OpenWebUI-User-Id`
- `X-OpenWebUI-User-Email`
- `X-OpenWebUI-User-Name`
@ -109,6 +113,12 @@ To track spend and usage for each Open WebUI user, configure both Open WebUI and
- Users can modify their own usernames
- Administrators can modify both usernames and emails of any account
This video walks through on how we can map the openweb ui headers to LiteLLM user roles
<iframe src="https://www.loom.com/embed/a1b6a4635fc0478ba4fd34cae16e2ffd?sid=791c2dcc-7e65-45be-bf7f-27d2601c123e" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen width="840" height="500"></iframe>
<br/>
<br/>
## Render `thinking` content on Open WebUI