-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: enable metadata parameter for OpenAI API calls #12999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add metadata to OPENAI_CHAT_COMPLETION_PARAMS and DEFAULT_CHAT_COMPLETION_PARAM_VALUES - Add metadata to OpenAIGPTConfig.get_supported_openai_params() - Add metadata parameter to get_optional_params() function signature - Pass metadata through to optional_params in completion flow - Remove preview features gate for metadata support - Ensure metadata is available in logging for all integrations Fixes issue where metadata was not being sent to OpenAI API despite being passed to litellm.completion(). The metadata field is now properly supported for OpenAI and tracked in logging integrations like Langfuse.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Hey @emerzon this was intentional - as the |
|
Hi @krrishdholakia, yes, we're trying to setup Session tracking in Langfuse, and it does require this feature: https://langfuse.com/docs/observability/features/sessions |
|
We are trying to send metadata to LangFuse to add more information. This change would be great to achieve our goal. |
same |
|
Hey @emerzon, do you know when this bug will be fixed? |
|
Hi, I'm wondering what's the status of this issue? We execute workflows consisting of hundreds of LLM requests in a B2B app. We use metadata to efficiently filter the traces in Arize Phoenix. This works well using LlamaIndex but with LiteLLM we lose the metadata making it impractical to work with the traces. |
|
Hi @krrishdholakia, any visibility on this issue? |
|
@krrishdholakia and @emerzon any updates on this? |
|
Closing in favor of #16523 |
Enable metadata parameter for OpenAI API calls
Fixes issue where metadata was not being sent to OpenAI API despite being passed to litellm.completion(). The metadata field is now properly supported for OpenAI and tracked in logging integrations like Langfuse.
Relevant issues
Fixes #12997
Type
🐛 Bug Fix
Changes