Python: Added support for application endpoints in Azure AI client#2460
Merged
dmytrostruk merged 5 commits intomicrosoft:mainfrom Nov 25, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for Azure AI application-scoped endpoints with the format /api/projects/<project-name>/applications/<application-name>/protocols. The key change is that when an application endpoint is detected, the client skips adding the "agent" property to the request body, as application-scoped response APIs don't support it.
- Adds endpoint detection logic in
AzureAIClientto identify application endpoints - Modifies
prepare_optionsto conditionally include agent reference based on endpoint type - Includes a new sample demonstrating application endpoint usage
- Adds test coverage for the endpoint behavior distinction
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
python/packages/azure-ai/agent_framework_azure_ai/_client.py |
Adds _is_application_endpoint flag to detect application endpoints and conditionally includes agent reference in request options |
python/packages/azure-ai/tests/test_azure_ai_client.py |
Adds parametrized test to verify that agent reference is excluded for application endpoints and included for project endpoints |
python/samples/getting_started/agents/azure_ai/azure_ai_with_application_endpoint.py |
Adds new sample demonstrating how to use AzureAIClient with an application-scoped endpoint |
python/samples/getting_started/agents/azure_ai/README.md |
Updates sample index to include reference to the new application endpoint sample |
python/samples/getting_started/agents/azure_ai/azure_ai_with_application_endpoint.py
Outdated
Show resolved
Hide resolved
…pplication_endpoint.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
eavanvalkenburg
approved these changes
Nov 25, 2025
giles17
approved these changes
Nov 25, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
…icrosoft#2460) * Added support for application endpoints in Azure AI client * Fixed tests * Update python/samples/getting_started/agents/azure_ai/azure_ai_with_application_endpoint.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Addressed comments --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Updated Azure AI client to support application-scoped endpoints with format:
Contribution Checklist