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
{{ message }}
Repository navigation
Python: [Feature]: Add timeout parameter to FoundryChatClient #9698
FoundryAgent and the base OpenAI chat clients accept a timeout argument, but FoundryChatClient and RawFoundryChatClient do not. There is no supported way to set an HTTP timeout when constructing a FoundryChatClient.
Callers currently have to reassign the wrapped client after construction:
This relies on client.client being a reassignable attribute, which is not a documented contract.
Proposal
Add timeout: float | None = None to RawFoundryChatClient.__init__ and FoundryChatClient.__init__, and apply it with openai_client.with_options(timeout=timeout) on the client returned by project_client.get_openai_client(). This mirrors what FoundryAgent already does. When not provided, behavior is unchanged (OpenAI SDK default).
I have a small PR ready (implementation plus unit tests) and will link it here.
This is a capability core MAF should own: supported HTTP-timeout configuration is broadly useful for users of the first-party Foundry clients. The team will consider this request without a commitment to implementation or timing.
Before settling the constructor contract, we should confirm omitted/default timeout behavior, handling and ownership of injected clients, and consistency with FoundryAgent. Existing implementation review is tracked in #9699.
/plan Check the public timeout contract against existing PR #9699, which already has maintainer approval, rather than proposing parallel implementation. Preserve omitted/default timeout behavior, confirm caller-owned client lifetimes, and verify consistency with FoundryAgent.
Activity
eavanvalkenburg commentedon Oct 26, 2026
This is a capability core MAF should own: supported HTTP-timeout configuration is broadly useful for users of the first-party Foundry clients. The team will consider this request without a commitment to implementation or timing.
Before settling the constructor contract, we should confirm omitted/default timeout behavior, handling and ownership of injected clients, and consistency with FoundryAgent. Existing implementation review is tracked in #9699.
eavanvalkenburg commentedon Oct 26, 2026
/plan Check the public timeout contract against existing PR #9699, which already has maintainer approval, rather than proposing parallel implementation. Preserve omitted/default timeout behavior, confirm caller-owned client lifetimes, and verify consistency with FoundryAgent.