Python: [BREAKING] Python: Provider-leading client design & OpenAI package extraction#4818
Open
eavanvalkenburg wants to merge 10 commits intomicrosoft:mainfrom
Open
Python: [BREAKING] Python: Provider-leading client design & OpenAI package extraction#4818eavanvalkenburg wants to merge 10 commits intomicrosoft:mainfrom
eavanvalkenburg wants to merge 10 commits intomicrosoft:mainfrom
Conversation
Member
ca4c3d7 to
154a180
Compare
moonbox3
reviewed
Mar 21, 2026
python/packages/azure-ai/agent_framework_azure_ai/_deprecated_azure_openai.py
Show resolved
Hide resolved
python/packages/foundry_local/agent_framework_foundry_local/_foundry_local_client.py
Show resolved
Hide resolved
moonbox3
approved these changes
Mar 21, 2026
## Summary Major refactoring of the Python Agent Framework client architecture: - Extract OpenAI clients into new `agent-framework-openai` package - Core package no longer depends on openai, azure-identity, azure-ai-projects - Rename clients for discoverability: OpenAIResponsesClient → OpenAIChatClient, OpenAIChatClient → OpenAIChatCompletionClient - Unify `model_id`/`deployment_name`/`model_deployment_name` → `model` param - New FoundryChatClient for Azure AI Foundry Responses API - New FoundryAgent/FoundryAgentClient for connecting to pre-configured Foundry agents - Remove OpenAIBase/OpenAIConfigMixin from non-deprecated client MRO - Deprecate AzureOpenAI* clients, AzureAIClient, OpenAIAssistantsClient - Reorganize samples: azure_openai+azure_ai+azure_ai_agent → azure/ - ADR-0020: Provider-Leading Client Design Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…local sample Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- azure-ai mypy: add type ignores for TypedDict total=, model arg, forward ref - Coverage: replace core.azure/openai targets with openai package target - project_provider: add type annotation for opts dict Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…gets Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
23f1aba to
d16352c
Compare
moonbox3
approved these changes
Mar 22, 2026
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.
Motivation and Context
Make
agent-framework-corelightweight by extracting OpenAI clients into their own package, and improve discoverability by using provider-leading naming conventions. See ADR-0020 for full rationale.Description
New
agent-framework-openaipackage:OpenAIChatClient(Responses API, wasOpenAIResponsesClient)OpenAIChatCompletionClient(Chat Completions API, wasOpenAIChatClient)OpenAIEmbeddingClientCore made lighter:
openai,azure-identity,azure-ai-projects,packagingfrom core depsagent_framework.openaiandagent_framework.azureare lazy-loading gatewaysNew Foundry clients in azure-ai:
FoundryChatClient/RawFoundryChatClient— Responses API via Foundry projectFoundryAgent/RawFoundryAgent— connect to pre-configured PromptAgents/HostedAgentsRawFoundryAgentChatClient— extension point for custom client middlewareParameter unification:
model_id/deployment_name/model_deployment_name→modelOPENAI_RESPONSES_MODEL_ID/OPENAI_CHAT_MODEL_ID→OPENAI_MODELFOUNDRY_MODEL,FOUNDRY_PROJECT_ENDPOINTfor Foundry clientsClass hierarchy cleanup:
OpenAIBase/OpenAIConfigMixinremoved from non-deprecated MRO_ensure_client/_initialize_clientremoved (client set directly in Raw init)AzureOpenAI*clients,AzureAIClient,AzureAIAgentClient,OpenAIAssistantsClient_deprecated_azure_openai.pyfor clean deletionSamples:
azure_openai/+azure_ai/+azure_ai_agent/merged intoazure/FoundryAgentandFoundryChatClientsamples addedFoundryChatClientas_agent()replaced withAgent(client=...)patternAzureCliCredential, neverDefaultAzureCredentialContribution Checklist