Repository navigation
Python: Add timeout parameter to FoundryChatClient - #9699
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoOct 26, 2026
Conversation
Apply the timeout to the OpenAI client returned by the project client, matching what FoundryAgent already does.
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
October 26, 2026 08:56 — with
GitHub Actions
Inactive
Dineshsuriya D (droideronline)
had a problem deploying
to
github-app-auth
October 26, 2026 08:56 — with
GitHub Actions
Error
Dineshsuriya D (droideronline)
marked this pull request as ready for review
October 26, 2026 08:56
Dineshsuriya D (droideronline)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 26, 2026 08:56
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
October 26, 2026 08:56 — with
GitHub Actions
Inactive
Member
|
/review |
Contributor
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): 814361287216
Model: gpt-5.6-sol
Overview
The PR adds an optional keyword-only timeout to both Foundry chat-client constructors and applies it by cloning the OpenAI client with with_options, matching the existing FoundryAgent contract. The default path preserves the original client, and focused tests cover both configured and omitted timeout behavior. No publishable correctness, compatibility, architecture, or security issue was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 26, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
FoundryAgentaccepts atimeout, butFoundryChatClientandRawFoundryChatClientdo not, so there is no supported way to set an HTTP timeout on them. Callers have to reassignclient.clientafter construction.Description & Review Guide
timeout: float | None = NonetoRawFoundryChatClient.__init__andFoundryChatClient.__init__.openai_client.with_options(timeout=timeout)on the client returned byproject_client.get_openai_client(), the same approachFoundryAgentuses.timeoutis passed. The default keeps the OpenAI SDK behavior.with_optionsafterget_openai_client()is the right place, consistent withFoundryAgent.Related Issue
Fixes #9698
AI Assistance
AI assistance details: implementation, tests, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.