Add Default Headers to LiteLLM Provider #5241
andrewshu2000
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Add support for sending default headers with all LiteLLM API requests to track the originating app, ensuring consistent header usage across all API providers.
Problem Statement
Currently, when using LiteLLM as an API provider, the default headers that track the originating app (
HTTP-Referer
andX-Title
) are not being sent with requests. These headers were added in PR #1300 for other providers but were missed for LiteLLM. This inconsistency means we cannot properly track which requests are coming from our application when using the LiteLLM provider.Proposed Solution
Modify the LiteLLM provider implementation to include the default headers in all API requests:
RouterProvider
class to include DEFAULT_HEADERS in the OpenAI client initializationBenefits
Beta Was this translation helpful? Give feedback.
All reactions