Repository navigation
Make ChatGPT connector timeout configurable - #3487
Open
m86hussein wants to merge 1 commit into
Open
m86hussein wants to merge 1 commit into
m86hussein wants to merge 1 commit into
Conversation
The ChatGPT connector wrapped the completion call in asyncio.wait_for with a hard-coded 10s timeout, so long-running completions (e.g. reasoning models) failed with TimeoutError even when callers set a timeout in chatgpt_config. Read the timeout from chatgpt_config (defaulting to TIMEOUT_SECONDS) so the wait_for guard and the OpenAI request agree. Fixes flyteorg/flyte#8287 Signed-off-by: m86hussein <m86hussein@gmail.com>
m86hussein
requested review from
cosmicbboy,
davidmirror-ops,
kumare3,
machichima,
pingsutw,
samhita-alla and
wild-endeavor
as code owners
November 8, 2026 11:59
|
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
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.
Why
The ChatGPT connector wrapped the completion call in
asyncio.wait_for(...)with a hard-coded 10s timeout (TIMEOUT_SECONDS). Long-running completions (e.g. reasoning models) therefore failed withTimeoutErroreven when a caller passed atimeoutinchatgpt_config— that value only reached the OpenAI SDK, not thewait_forguard.What
chatgpt_config.get("timeout", TIMEOUT_SECONDS)so thewait_forguard and the OpenAI request use the same value.timeoutis set.wait_forreceives the configured timeout (and the 10s default otherwise).Related issue
Fixes flyteorg/flyte#8287