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

Ouverte
#49,154 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
45/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
api, backend, devtools

Piste de recherche

The issue is about adding HTTPX async transport support to azure-ai-projects and azure-ai-inference. Start by reading the linked azure-core issue #41382 and the existing AsyncHttpXTransport in azure-core-experimental. Examine the generated async client in azure/ai/projects/aio/_client.py and the pyproject.toml dependencies. The goal is to allow using HTTPX instead of aiohttp, enabling Trio/AnyIO support while preserving the asyncio path. 'Done' means the async clients work with both asyncio and Trio backends via AnyIO, including authentication and streaming.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

AI Projects Client customer-reported question
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
Langage dominant
Python
Étoiles
5.6k
Forks
3.4k
Merge moyen
1 j 22 h
PR mergées (30 j)
189

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Azure/azure-sdk-for-python

Toutes les issues de Azure/azure-sdk-for-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.