You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FoundryChatClient / RawFoundryChatClient obtain their async OpenAI client via project_client.get_openai_client(**openai_kwargs) but only forward default_headers (and an internal feature-usage http_client when the framework constructs the project client). There is no supported way to set OpenAI SDK options such as max_retries at construction time.
In agent-framework-foundry 1.15.0, when a caller passes an existing AIProjectClient via project_client=, the OpenAI client inherits the SDK default max_retries (typically 2). Hosts that share one AIProjectClient across several FoundryChatClient instances and need fail-fast behavior on throttling (no automatic HTTP retries) currently subclass AIProjectClient and override get_openai_client to inject max_retries=0. That works but depends on the internal call path in FoundryChatClient.__init__ continuing to call get_openai_client without retry arguments.
Related: #9698 added timeout on the same code path; max_retries is the same class of gap.
Proposal
Add one of:
max_retries: int | None = None on RawFoundryChatClient / FoundryChatClient, forwarded into project_client.get_openai_client(max_retries=..., **openai_kwargs) when set; or
A broader openai_client_kwargs: Mapping[str, Any] | None (or **openai_client_kwargs) forwarded to get_openai_client; or
Documented support for passing a pre-built async OpenAI client (if that is the preferred extension point).
When not provided, behavior should remain unchanged (SDK defaults).
Language
Python
Context
Tracked internally as CFX-15650 (Cofoundrs Hosted Agent).
Activity