Skip to content

[Bug] User Header from OpenWebUI Not Appearing in Spend Logs #12893

Description

@wichmann-git

What happened?

I am trying to track per-user spend from Open WebUI in LiteLLM using custom headers, but the user header does not show up in the spend logs.

Configuration:

  • OpenWebUI is started with:
    ENABLE_FORWARD_USER_INFO_HEADERS=True
    
  • Working fine:
Image
  • LiteLLM config.yaml:
    litellm_settings: 
      extra_spend_tag_headers:
        - "X-OpenWebUI-User-Name"
    
    general_settings: 
      user_header_name: X-OpenWebUI-User-Name
    
  • I have verified that OpenWebUI is sending the X-OpenWebUI-User-Name header in the HTTP requests to LiteLLM.
  • LiteLLM version: main-latest
  • In the -env File is STORE_MODEL_IN_DB and STORE_PROMPTS_IN_SPEND_LOGS enabled
  • Docker-Compose:
Image

Problem:
Despite this setup, I do not see the user header in the spend logs or in the Usage/Logs section of the LiteLLM UI. I have also tried using lowercase header names and checked for case sensitivity, but it did not resolve the issue.

Steps Tried:

Expected:
User header should be visible in spend logs for each request.

Actual:
User header does not appear in spend logs.

Additional Info:
Please let me know if you need any logs or further debugging information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions