Skip to content

Update Azure OpenAI to the latest GA API version#1001

Merged
dkotter merged 3 commits intodevelopfrom
update/azure-openai-api
Sep 10, 2025
Merged

Update Azure OpenAI to the latest GA API version#1001
dkotter merged 3 commits intodevelopfrom
update/azure-openai-api

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented Sep 8, 2025

Description of the Change

We had a report that if using Azure OpenAI with the Key Takeaways Feature, the response would always fail because we set the reponse_type to be json_schema and it seems that isn't supported in the API version we were using.

This PR fixes that by updating the API version from 2023-05-15 to the latest GA release, 2024-10-21. This release does support structured outputs but worth noting that only works if using a compatible model.

In addition, this PR adds a new helper method to get the API version and wraps the response of that in a new filter, classifai_azure_openai_api_version, making it easier for others to change the API version that is used (if, for instance, you want to use a preview version).

And finally, in testing to ensure this new API version works for all the Features we support, discovered that the Content Generation Feature wasn't working due to an existing bug so that is fixed here as well.

How to test the Change

Azure OpenAI supports the following Language Processing Features:

  • Title Generation
  • Excerpt Generation
  • Content Generation
  • Content Resizing
  • Key Takeaways

Configure each of these to use Azure OpenAI and ensure they all still work. Note that for the Key Takeaways Feature, you need to test with a compatible model (not GPT-3.5 Turbo for instance).

Changelog Entry

Changed - Update the Azure OpenAI API version from 2023-05-15 to 2024-10-21
Fixed - Ensure the Content Generation Feature works when using Azure OpenAI as the Provider
Developer - New filter, classifai_azure_openai_api_version, that makes it easier to change the API version Azure OpenAI uses

Credits

Props @gsarig, @dkotter

Checklist:

@dkotter dkotter added this to the 3.7.0 milestone Sep 8, 2025
@dkotter dkotter self-assigned this Sep 8, 2025
@dkotter dkotter requested review from a team and jeffpaul as code owners September 8, 2025 17:21
@github-actions github-actions bot added the needs:code-review This requires code review. label Sep 8, 2025
@jeffpaul jeffpaul moved this to Code Review in Open Source Practice Sep 8, 2025
@jeffpaul jeffpaul requested a review from iamdharmesh September 8, 2025 18:35
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkotter Thanks for the fixing this. Code looks good and it tests well. (I skipped testing of key takeaway block as it's not compatible with GPT-3.5 Turbo)

@github-project-automation github-project-automation bot moved this from Code Review to QA Testing in Open Source Practice Sep 9, 2025
@dkotter dkotter requested a review from gsarig September 9, 2025 16:24
@dkotter
Copy link
Collaborator Author

dkotter commented Sep 9, 2025

@gsarig Let me know if you have time to test this and ensure it fixes the issues you were running into, prior to us merging this in. Thanks!

@gsarig
Copy link

gsarig commented Sep 10, 2025

@gsarig Let me know if you have time to test this and ensure it fixes the issues you were running into, prior to us merging this in. Thanks!

Hi @dkotter Yes, it seems to work as expected, thank you!

@dkotter dkotter merged commit 639cb38 into develop Sep 10, 2025
19 checks passed
@dkotter dkotter deleted the update/azure-openai-api branch September 10, 2025 14:30
@github-project-automation github-project-automation bot moved this from QA Testing to Done in Open Source Practice Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants