Skip to content

[azure-ai-projects] Support an HTTPX async transport for AnyIO/Trio applications #49154

Description

Motivation

Microsoft Agent Framework is assessing support for applications running on either asyncio or Trio through AnyIO. Its Foundry integration uses azure.ai.projects.aio.AIProjectClient (and azure.ai.inference.aio for embeddings). The current azure-ai-projects package explicitly requires aiohttp, and these async clients use azure-core's pipeline, whose default async transport is aiohttp. HTTPX supports both asyncio and Trio; requiring aiohttp keeps this path tied to asyncio even if the calling framework uses AnyIO.

Request

Please make a supported HTTPX-based async transport available end to end for azure-ai-projects (and coordinate with azure-ai-inference and async identity/credential paths where needed), so callers can use Foundry async clients under Trio without requiring aiohttp. Replacing the default aiohttp transport with HTTPX would meet the need; if a change of default is too disruptive, a stable, documented HTTPX transport option that avoids a mandatory aiohttp dependency would also work. Preserve the existing asyncio path.

An application should be able to run the same AIProjectClient operation with anyio.run(main, backend="asyncio") and anyio.run(main, backend="trio"), including authentication, concurrent requests, response streaming, and clean cancellation/close. A transport substitution alone is insufficient if another layer still creates asyncio-only resources.

Related work and references

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI ProjectsClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions