Python: Agent name as required for AzureAIClient#2198
Merged
dmytrostruk merged 4 commits intomicrosoft:mainfrom Nov 14, 2025
Merged
Python: Agent name as required for AzureAIClient#2198dmytrostruk merged 4 commits intomicrosoft:mainfrom
dmytrostruk merged 4 commits intomicrosoft:mainfrom
Conversation
Member
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR makes the agent name a required parameter for AzureAIClient by removing the default "UnnamedAgent" fallback value. Users must now explicitly provide an agent name either when initializing AzureAIClient or when creating a ChatAgent.
Key Changes:
- Added validation to enforce agent_name as a required parameter with a clear error message
- Removed redundant agent_name assignments after fetching or creating agents
- Updated sample code to include the required name parameter
- Added test coverage for the missing agent_name validation
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
python/uv.lock |
Version bump for the ag-ui package |
python/samples/getting_started/agents/azure_ai/azure_ai_with_code_interpreter.py |
Added name="MyCodeInterpreterAgent" parameter to demonstrate required agent naming |
python/packages/azure-ai/tests/test_azure_ai_client.py |
Added test case to validate ServiceInitializationError when agent_name is missing |
python/packages/azure-ai/agent_framework_azure_ai/_client.py |
Enforced agent_name as required with validation logic, removed redundant assignments, updated docstring for agent_name parameter, and added docstring for prepare_options method |
alliscode
approved these changes
Nov 13, 2025
moonbox3
approved these changes
Nov 14, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 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
Removed
UnnamedAgentdefault name and made agent name as required parameter inAzureAIClient.Contribution Checklist