Skip to content

Python: Fix Foundry aiohttp dependency - #6567

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
eavanvalkenburg:ev/foundry-aiohttp-dependency
Jun 18, 2026
Merged

Python: Fix Foundry aiohttp dependency#6567
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
eavanvalkenburg:ev/foundry-aiohttp-dependency

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Motivation & Context

Installing only agent-framework-foundry leaves out aiohttp, but the Foundry package constructs async Azure AI Projects clients through azure.ai.projects.aio.AIProjectClient. In a minimal install, constructing FoundryChatClient fails with ModuleNotFoundError: No module named 'aiohttp'.

The root cause is that azure-ai-projects depends on plain azure-core; aiohttp is only exposed through Azure Core's optional aio extra. An upstream Azure SDK issue was opened at Azure/azure-sdk-for-python#47539, but agent-framework-foundry should still declare the runtime dependency needed by its own async client surface.

Description & Review Guide

  • What are the major changes? Add aiohttp>=3.9,<4 to agent-framework-foundry and update uv.lock package metadata.
  • What is the impact of these changes? Minimal agent-framework-foundry installs now include the async Azure Core transport dependency needed to construct Foundry clients.
  • What do you want reviewers to focus on? Whether declaring aiohttp directly on agent-framework-foundry is the right defensive package metadata fix while the Azure SDK upstream issue is pending.

Related Issue

Fixes #6566

No other open PR was found for this issue.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 17, 2026 13:06
@moonbox3 Evan Mattson (moonbox3) added the python Usage: [Issues, PRs], Target: Python label Jun 17, 2026

Copilot AI 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

This PR fixes a missing runtime dependency for the Python agent-framework-foundry package so that a minimal install can successfully construct Foundry clients that rely on azure.ai.projects.aio.AIProjectClient (which in turn requires aiohttp).

Changes:

  • Add aiohttp>=3.9,<4 as a direct dependency of agent-framework-foundry.
  • Update python/uv.lock metadata to reflect the new dependency for the Foundry package.

Reviewed changes

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

File Description
python/packages/foundry/pyproject.toml Declares aiohttp as a direct runtime dependency for agent-framework-foundry.
python/uv.lock Updates the workspace lock metadata so Foundry’s resolved dependencies include aiohttp.

@github-actions

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL40015451088% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
7990 34 💤 0 ❌ 0 🔥 1m 57s ⏱️

@github-actions github-actions Bot 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.

Automated Code Review

Reviewers: 5 | Confidence: 92% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by eavanvalkenburg's agents

Merged via the queue into microsoft:main with commit d7e63d7 Jun 18, 2026
42 checks passed
@eavanvalkenburg
Eduard van Valkenburg (eavanvalkenburg) deleted the ev/foundry-aiohttp-dependency branch June 30, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: agent-framework-foundry misses aiohttp dependency

4 participants