Skip to content

Conversation

@dmytrostruk
Copy link
Member

Motivation and Context

Resolves: #3228
Resolves: #3229

Fixes for model and strict parameters.

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 Jan 16, 2026
Copilot AI review requested due to automatic review settings January 16, 2026 02:06
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/azure-ai/agent_framework_azure_ai
   _project_provider.py921385%128–129, 205, 212, 277, 321, 354, 403–405, 409–411
   _shared.py27710263%118, 120, 122, 124, 169, 257–260, 263–265, 268–269, 279, 286–288, 314–323, 370, 386–388, 390–407, 415–418, 421–422, 425–432, 437–438, 444–446, 449–450, 452, 464, 466–467, 469–470, 472–473, 475–483, 485, 521, 523–526, 528, 534, 540, 544, 559, 562–563, 565
packages/core/agent_framework/openai
   _assistants_client.py2733487%60, 353, 367, 370, 372–373, 376, 379, 382–383, 394, 419, 421, 423, 425, 427, 432, 435, 438, 442, 453, 538, 557–558, 561, 569, 621, 656, 691–694, 746, 763
TOTAL17361265384% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3143 213 💤 0 ❌ 0 🔥 1m 4s ⏱️

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 fixes issues with model and strict parameters in the Agent API and improves sample code to demonstrate both default and runtime response format configuration.

Changes:

  • Added strict=True when converting Pydantic models to JSON schema format for structured outputs
  • Fixed missing model_deployment_name parameter when creating ChatAgent from Azure AI agent details
  • Enhanced sample examples to demonstrate both default_options at creation time and runtime overrides

Reviewed changes

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

Show a summary per file
File Description
python/packages/core/agent_framework/openai/_assistants_client.py Added strict=True to Pydantic response format conversion
python/packages/core/tests/openai/test_openai_assistants_client.py Added unit test for strict parameter with Pydantic models
python/packages/azure-ai/agent_framework_azure_ai/_shared.py Added strict=True to Azure AI Pydantic response format conversion
python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py Added missing model_deployment_name parameter to AzureAIClient
python/packages/azure-ai/tests/test_provider.py Enhanced test to verify AzureAIClient initialization and added test for strict parameter
python/samples/getting_started/agents/openai/openai_assistants_with_response_format.py Enhanced example to show both default and runtime response format override
python/samples/getting_started/agents/azure_ai_agent/azure_ai_with_response_format.py Enhanced example to show both default and runtime response format override
python/samples/getting_started/agents/azure_ai/azure_ai_with_runtime_json_schema.py Fixed to use default_options instead of direct parameter
python/samples/getting_started/agents/azure_ai/azure_ai_with_response_format.py Updated comment for clarity

@dmytrostruk dmytrostruk added this pull request to the merge queue Jan 16, 2026
Merged via the queue into microsoft:main with commit b773830 Jan 16, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

4 participants