Skip to content

Python: Upgraded azure-ai-projects to 2.0.0b4#4438

Merged
dmytrostruk merged 4 commits intomicrosoft:mainfrom
dmytrostruk:azure-ai-upgrade
Mar 4, 2026
Merged

Python: Upgraded azure-ai-projects to 2.0.0b4#4438
dmytrostruk merged 4 commits intomicrosoft:mainfrom
dmytrostruk:azure-ai-upgrade

Conversation

@dmytrostruk
Copy link
Member

Motivation and Context

  • Upgraded Microsoft Foundry support to azure-ai-projects==2.0.0b4 and migrated breaking SDK changes across the Foundry integration, including renamed model classes and the agent_reference request shape.
  • Updated tests and affected samples (including memory/code-interpreter paths)

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 Mar 3, 2026
Copilot AI review requested due to automatic review settings March 3, 2026 21:47
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

Updates the Python Azure AI Foundry integration to work with azure-ai-projects==2.0.0b4, migrating code/tests/samples to the SDK’s breaking changes (notably agent reference payload shape and renamed model classes).

Changes:

  • Bumps azure-ai-projects from 2.0.0b3 to 2.0.0b4 (and updates the lockfile accordingly).
  • Migrates agent creation/run plumbing to the new agent_reference request shape and updated SDK model types.
  • Updates Foundry Memory store usage to the new project_client.beta.memory_stores surface and refreshes impacted samples/tests.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
python/uv.lock Locks azure-ai-projects==2.0.0b4 and associated dependency metadata changes.
python/packages/core/pyproject.toml Pins core dependency to azure-ai-projects==2.0.0b4.
python/packages/azure-ai/agent_framework_azure_ai/_client.py Switches request payload to extra_body.agent_reference, updates renamed SDK types, and adds foundry_features pass-through.
python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py Updates provider API to accept reference mappings and adapts to renamed SDK model types / new create_version kwargs.
python/packages/azure-ai/agent_framework_azure_ai/_shared.py Migrates structured output response-format model types to new SDK class names.
python/packages/azure-ai/agent_framework_azure_ai/_foundry_memory_provider.py Moves memory store operations to project_client.beta.memory_stores and updates request item shapes.
python/packages/azure-ai/tests/test_azure_ai_client.py Updates unit tests for agent_reference, renamed response-format models, and code interpreter container model changes.
python/packages/azure-ai/tests/test_provider.py Updates provider reference tests to use mapping-based references instead of AgentReference.
python/samples/02-agents/providers/azure_ai/azure_ai_provider_methods.py Updates sample to use mapping-based agent references.
python/samples/02-agents/providers/azure_ai/azure_ai_with_memory_search.py Updates sample to use beta.memory_stores and the preview memory search tool type.
python/samples/02-agents/context_providers/azure_ai_foundry_memory.py Updates sample to use beta.memory_stores for create/search/delete.

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Mar 3, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/azure-ai/agent_framework_azure_ai
   _client.py4005187%392, 394, 417, 441, 449–461, 474, 535, 550–555, 598, 614–615, 641–642, 660, 695, 697, 718–719, 722, 763, 766, 768, 859, 890, 932, 1141, 1144, 1147–1148, 1150–1153, 1196
   _foundry_memory_provider.py870100% 
   _project_provider.py122595%209, 250, 310, 350, 383
   _shared.py2492191%110, 181, 229, 231–233, 265, 308, 320–322, 351, 353, 355, 359, 424, 455, 496, 503, 515, 534
TOTAL22539278587% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
4580 25 💤 0 ❌ 0 🔥 1m 18s ⏱️

@dmytrostruk dmytrostruk enabled auto-merge March 4, 2026 00:07
@dmytrostruk dmytrostruk added this pull request to the merge queue Mar 4, 2026
Merged via the queue into microsoft:main with commit b5edb52 Mar 4, 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

Development

Successfully merging this pull request may close these issues.

5 participants