Pass extra_body params in the request-body to vertexAI - #14311
Conversation
extra body params passed to the request body
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I’ve updated the implementation to support passing labels and other explicitly allowed fields via extra_body as per the suggestions in #9175
Could you please take a look and approve if everything looks good? Please let me know of any suggestions/changes. @krrishdholakia @ishaan-jaff |
|
This is not needed. Provider specific params are already passed straight through. https://docs.litellm.ai/docs/completion/provider_specific_params Can you share the issue you face today? With steps to repro |
|
@krrishdholakia Unfortunately, that's not the case with Vertex-AI. There are only a few parameters that are being set in the requestBody (attached the code snippet), all other optional_parameters are ignored. More info - #9175 There are other parameters which Vertex-AI support Eg: labels which is a must to have cost observability. Really looking forward for this feature to pass-along labels , please have a look |
|
Any more progress on this one? Seems to be stuck in open with solution proposed? |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |

Title
Support for passing extra_body (eg:- labels ) parameters to Vertex AI models
Relevant issues
#13692
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unitType
🐛 Bug Fix
Changes
litellm/llms/vertex_ai/gemini/transformation.py:Logic to pass along extra_body paramstests/test_litellm/llms/vertex_ai/test_vertex.py:Added Test case