Repository navigation
Use the client timeout in run_sync and run - #105
Merged
Merged
Conversation
InferenceClient.run_sync and run always used a timeout of 300 seconds when the caller gave none. The client timeout_seconds had no effect on them. With InferenceClient(..., timeout_seconds=900), post() waited 900 seconds and run_sync() stopped after 300 seconds. run_sync and run now use the client timeout_seconds when the caller gives none, like the HTTP verb helpers. Deployment.run_sync and run now pass None to the inference client, so the client setting applies. The old timeout tests used a client with the default of 300 seconds, so they passed with the bug. The new test uses a client with 900 seconds for each entry point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yutkin
marked this pull request as ready for review
October 30, 2026 11:09
tamirse
approved these changes
Oct 30, 2026
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.
Summary
InferenceClient.run_syncandrunused 300 seconds when the caller gave notimeout_seconds. The clienttimeout_secondshad no effect on them. The HTTP verb helpers (get,postand the others) already use the client value.Deployment.run_syncandDeployment.runnow also default toNone. They send the value to the inference client, and the client value applies.The old timeout tests used a client with the default of 300 seconds. That value is the same as the old hard-coded value, so the tests passed with the bug. The new test uses a client with 900 seconds for each entry point.
Evidence
mastersource.Merge Danger
Door: two-way
A revert brings back the old default.
Blast Radius: small
Only a caller that sets
timeout_secondson the client and does not set it onrun_syncorrunsees a change. That caller now gets the client value, not 300 seconds. A client with a value lower than 300 now stops these calls earlier.Deploymentcreates its client with the default of 300, soDeploymentcalls do not change.🤖 Generated with Claude Code