refactor: replace openai sdk with foundrysdk#344
Merged
Avijit-Microsoft merged 5 commits intodevfrom Nov 28, 2025
Merged
Conversation
Avijit-Microsoft
approved these changes
Nov 28, 2025
|
🎉 This PR is included in version 1.11.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Purpose
This pull request migrates the content processing pipeline from using the OpenAI SDK to the new Azure AI Foundry (Inference) SDK, updates dependencies, and refactors related code to accommodate the new SDK’s response format. It also improves the confidence merging logic and updates infrastructure permissions for Azure AI Developer role.
SDK Migration and Dependency Updates
openaiSDK withazure-ai-inferencethroughout the codebase, updating bothrequirements.txtandpyproject.tomlto removeopenaiand addazure-ai-inference. [1] [2]azure_openai.pyto useChatCompletionsClientfrom the Azure AI Foundry SDK and updated endpoint handling.Pipeline Handler Refactoring
map_handler.pyto invoke the Azure AI Foundry client for completions, handle schema validation, and serialize responses in the new format, including logprobs and usage details. [1] [2] [3]evaluate_handler.pyto deserialize and process responses according to the new Azure AI Foundry format, including changes to how confidence scores and token usage are extracted. [1] [2] [3]Confidence Logic Improvements
confidence.pyto merge keys from both input dictionaries, ensuring no data loss if keys are present in only one input.Configuration and Infrastructure Updates
application_configuration.py. [1] [2]Does this introduce a breaking change?
Golden Path Validation
Deployment Validation