Skip to content

Conversation

@dmytrostruk
Copy link
Member

Motivation and Context

Resolves: #1993

Renamed async_credential parameter in several chat clients to credential to make it shorter and for consistency between different providers.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@dmytrostruk dmytrostruk self-assigned this Dec 5, 2025
Copilot AI review requested due to automatic review settings December 5, 2025 00:55
@dmytrostruk dmytrostruk added python breaking change Introduces changes that are not backward compatible and may require updates to dependent code. labels Dec 5, 2025
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation lab Agent Framework Lab labels Dec 5, 2025
Copilot finished reviewing on behalf of dmytrostruk December 5, 2025 00:57
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Dec 5, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/azure-ai/agent_framework_azure_ai
   _chat_client.py4147980%296, 525–526, 528, 531, 534–539, 541, 549, 561–563, 567, 570–571, 579–582, 592, 600–603, 605–606, 608–609, 616, 624–625, 633–634, 639–640, 644–651, 656–657, 665, 671, 679–681, 684, 706–707, 769, 784, 796–800, 827–829, 832–833, 891–896, 917, 958, 967, 993
   _client.py1643081%174–177, 181–182, 184, 225, 227–230, 232, 369–372, 376, 378–379, 381–389, 391
TOTAL16230254084% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2322 130 💤 0 ❌ 0 🔥 58.789s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a breaking change that renames the async_credential parameter to credential across Azure AI chat clients (AzureAIClient and AzureAIAgentClient) for improved consistency and brevity. The change affects the core implementation, all sample code, tests, and documentation.

Key Changes

  • Renamed async_credential parameter to credential in AzureAIClient and AzureAIAgentClient constructors
  • Updated all sample files to use the new parameter name
  • Updated test files and documentation to reflect the change

Reviewed changes

Copilot reviewed 65 out of 65 changed files in this pull request and generated no comments.

Show a summary per file
File Description
python/packages/azure-ai/agent_framework_azure_ai/_client.py Updated AzureAIClient.__init__ parameter from async_credential to credential, including docstrings and internal references
python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py Updated AzureAIAgentClient.__init__ parameter from async_credential to credential, including docstrings and internal references
python/packages/azure-ai/tests/test_azure_ai_client.py Updated test cases to use credential parameter in all client instantiations and updated related docstrings
python/packages/azure-ai/tests/test_azure_ai_agent_client.py Updated test cases to use credential parameter in all client instantiations and updated related docstrings
python/samples/getting_started/agents/azure_ai/*.py (15 files) Updated all Azure AI agent samples to use the new credential parameter
python/samples/getting_started/agents/azure_ai_agent/*.py (10 files) Updated all Azure AI agent client samples to use the new credential parameter
python/samples/getting_started/middleware/*.py (9 files) Updated middleware samples to use the new credential parameter
python/samples/getting_started/context_providers/**/*.py (6 files) Updated context provider samples to use the new credential parameter
python/samples/getting_started/workflows/agents/*.py (2 files) Updated workflow samples to use the new credential parameter
python/samples/getting_started/threads/suspend_resume_thread.py Updated thread management sample to use the new credential parameter
python/samples/getting_started/chat_client/azure_ai_chat_client.py Updated chat client sample to use the new credential parameter
python/samples/getting_started/declarative/*.py (2 files) Updated declarative agent samples to use the new credential parameter
python/samples/getting_started/devui/foundry_agent/agent.py Updated DevUI sample to use the new credential parameter
python/samples/semantic-kernel-migration/azure_ai_agent/*.py (3 files) Updated Semantic Kernel migration samples to use the new credential parameter, also improved async context manager formatting
python/samples/demos/workflow_evaluation/create_workflow.py Updated workflow evaluation demo to use the new credential parameter, includes additional code formatting improvements
python/packages/lab/gaia/samples/azure_ai_agent.py Updated GAIA sample to use the new credential parameter
python/samples/getting_started/context_providers/azure_ai_search/README.md Updated README documentation to show the new credential parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible and may require updates to dependent code. documentation Improvements or additions to documentation lab Agent Framework Lab python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: unify credential to either async or non-async

4 participants