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

Đang mở
#49,154 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api, backend, devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
5.6k
Fork
3.4k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
189

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-sdk-for-python

Tất cả issue của Azure/azure-sdk-for-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.