Skip to content

Python: add(azure-ai): support reasoning config for AzureAIClient - #3403

Merged
Evan Mattson (moonbox3) merged 6 commits into
microsoft:mainfrom
moonbox3:azure-ai-reasoning
Jan 23, 2026
Merged

Python: add(azure-ai): support reasoning config for AzureAIClient#3403
Evan Mattson (moonbox3) merged 6 commits into
microsoft:mainfrom
moonbox3:azure-ai-reasoning

Conversation

@moonbox3

Copy link
Copy Markdown
Contributor

Motivation and Context

With the current use of the AzureAIProjectAgentProvider, there's no handling for the reasoning config which some OpenAI reasoning models support.

Description

Add support for a reasoning config.

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.

CopilotAI review requested due to automatic review settings January 23, 2026 02:49
@markwallace-microsoftMark Wallace (markwallace-microsoft) added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Jan 23, 2026
@moonbox3Evan Mattson (moonbox3) added agents Usage: [Issues, PRs], Target: Single agent and removed documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs labels Jan 23, 2026
@markwallace-microsoft

Mark Wallace (markwallace-microsoft) commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/azure-ai/agent_framework_azure_ai
_client.py1934576%248–251, 256, 259–262, 267, 270–271, 274, 281, 345, 347, 395, 423–426, 469, 506, 508, 513, 515–516, 519–522, 524, 526–527, 529–537, 539, 584
_project_provider.py113992%126–127, 205, 303, 347, 380, 429–431
packages/core/agent_framework
_types.py94713286%71, 94–95, 149, 154, 173, 175, 179, 183, 185, 187, 189, 206–207, 209–211, 213–214, 216–217, 219–220, 235–237, 239–242, 259, 264, 269, 273, 299, 303, 647–648, 1019, 1081, 1098, 1116, 1121, 1139, 1147–1149, 1166–1167, 1169, 1187–1188, 1190, 1197–1198, 1200, 1235, 1246–1247, 1249, 1268–1269, 1272–1281, 1284–1287, 1289, 1293, 1327, 1360, 1532, 1537, 1541, 1545, 1737, 1747, 1792, 1837–1842, 1864, 1869, 2228, 2237, 2373, 2461–2463, 2502, 2558, 2579, 2588, 2817–2819, 2822–2824, 2828, 2833, 2837, 2949–2951, 2979, 3015, 3033, 3037–3039, 3041, 3052–3053, 3056–3060, 3066
TOTAL17491270684%

Python Unit Test Overview

TestsSkippedFailuresErrorsTime
3230213 💤0 ❌0 🔥1m 10s ⏱️

@markwallace-microsoftMark Wallace (markwallace-microsoft) added the documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs label Jan 23, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for configuring “reasoning” when working with Azure AI Project agents, along with a new sample and a unit test.

Changes:

  • Pass reasoning from default_options into PromptAgentDefinition during agent creation in AzureAIProjectAgentProvider.
  • Extend Azure AI client options typing to include reasoning and strip it from request-level options.
  • Add a new getting-started sample demonstrating reasoning output, plus a provider unit test.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
python/samples/getting_started/agents/azure_ai/azure_ai_with_reasoning.pyNew sample showing how to configure reasoning and display reasoning vs answer content.
python/samples/getting_started/agents/azure_ai/README.mdAdds the new sample to the examples table.
python/packages/azure-ai/tests/test_provider.pyAdds a unit test ensuring reasoning is passed into the created agent definition.
python/packages/azure-ai/agent_framework_azure_ai/_project_provider.pyWires default_options["reasoning"] into agent creation (PromptAgentDefinition).
python/packages/azure-ai/agent_framework_azure_ai/_client.pyAdds reasoning to options typing and excludes it from request-level run_options.

Comment threadpython/samples/getting_started/agents/azure_ai/README.md Outdated
Comment threadpython/packages/azure-ai/agent_framework_azure_ai/_client.py
Comment threadpython/samples/getting_started/agents/azure_ai/azure_ai_with_reasoning.py Outdated
Comment threadpython/packages/azure-ai/agent_framework_azure_ai/_client.py
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queueJan 23, 2026
Merged via the queue into microsoft:main with commit 7b8777dJan 23, 2026
24 checks passed
@github-project-automationgithub-project-automationBot moved this from In Review to Done in Agent FrameworkJan 23, 2026
Aris Nguyen (arisng) pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
…crosoft#3403)
* add(azure-ai): support reasoning config for AzureAIClient
* Update sample
* Merge main
* improvements
* improve sample
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentsUsage: [Issues, PRs], Target: Single agentdocumentationUsage: [Issues, PRs], Target: documentation in the code base and learn docspythonUsage: [Issues, PRs], Target: Python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@moonbox3@markwallace-microsoft@eavanvalkenburg@dmytrostruk