mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(litellm_pre_call_utils.py): only pass api_version if set
This commit is contained in:
parent
7080e3919d
commit
5f565806bd
1 changed files with 2 additions and 1 deletions
|
@ -181,7 +181,8 @@ async def add_litellm_data_to_request(
|
|||
## check for api version in query params
|
||||
dynamic_api_version: Optional[str] = query_dict.get("api-version")
|
||||
|
||||
data["api_version"] = dynamic_api_version
|
||||
if dynamic_api_version is not None: # only pass, if set
|
||||
data["api_version"] = dynamic_api_version
|
||||
|
||||
## Forward any LLM API Provider specific headers in extra_headers
|
||||
add_provider_specific_headers_to_request(data=data, headers=_headers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue