fix: response_format is ignored in Azure OpenAI models with API version >= 2025#9244
Closed
shionhonda wants to merge 1 commit intoBerriAI:mainfrom
Closed
fix: response_format is ignored in Azure OpenAI models with API version >= 2025#9244shionhonda wants to merge 1 commit intoBerriAI:mainfrom
shionhonda wants to merge 1 commit intoBerriAI:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
Author
|
Bug fixed in #9705 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
This PR fixes a bug in the function
_is_response_format_supported_api_version.Due to this bug, we are not passing the argument
response_formatin API version >= 2025.litellm/litellm/llms/azure/chat/gpt_transformation.py
Lines 117 to 124 in 3875df6
I believe it should evaluate true if it is >= "2024-08"
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
I followed the guideline but couldn't make the existing tests pass on the fresh main branch (
Failed: Error occurred: litellm.APIError: AzureException APIError - argument of type 'NoneType' is not iterable)Type
🐛 Bug Fix
Changes
_is_response_format_supported_api_versionshould be true when the API version >= 2025