Send tags to LiteLLM Proxy #3538

Closed
opened 2025-11-11 15:33:34 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @elabbarw on GitHub (Feb 2, 2025).

Is your feature request tied to a specific issue? Please elaborate.
Currently, Open WebUI lacks a built-in cost tracking system, which complicates users' efforts to manage and monitor expenses. Available solutions often require frequent adjustments, leading to potential inefficiencies.

Proposed Solution
I suggest introducing a feature that incorporates key metadata with a set of tags into the payload sent to LiteLLM, activated through the ENABLE_FORWARD_TAGS_LITELLM environment variable. This metadata would include tags such as {“tags”: [“openwebui”, “chat/image/audio/embedding”, user.id, user.email, user.name]}, facilitating seamless cost tracking using LiteLLM's features. This would eliminate the necessity of developing new cost management solutions.

Explored Alternatives

  • Implementing a filter function within Open WebUI to manage custom model names and base model names. However, this approach becomes inefficient when accommodating multiple models and user-generated models.
  • Creating a separate portal dedicated to cost tracking.

Additional Context
I've already successfully incorporated this feature in my internal fork. I would like to know if submitting a pull request for this enhancement is valuable, as it stands to significantly assist users in maintaining cost efficiency without the need for external tracking solutions.

Originally created by @elabbarw on GitHub (Feb 2, 2025). **Is your feature request tied to a specific issue? Please elaborate.** Currently, Open WebUI lacks a built-in cost tracking system, which complicates users' efforts to manage and monitor expenses. Available solutions often require frequent adjustments, leading to potential inefficiencies. **Proposed Solution** I suggest introducing a feature that incorporates key metadata with a set of tags into the payload sent to LiteLLM, activated through the ENABLE_FORWARD_TAGS_LITELLM environment variable. This metadata would include tags such as {“tags”: [“openwebui”, “chat/image/audio/embedding”, user.id, user.email, user.name]}, facilitating seamless cost tracking using LiteLLM's features. This would eliminate the necessity of developing new cost management solutions. **Explored Alternatives** - Implementing a filter function within Open WebUI to manage custom model names and base model names. However, this approach becomes inefficient when accommodating multiple models and user-generated models. - Creating a separate portal dedicated to cost tracking. **Additional Context** I've already successfully incorporated this feature in my internal fork. I would like to know if submitting a pull request for this enhancement is valuable, as it stands to significantly assist users in maintaining cost efficiency without the need for external tracking solutions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3538