-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Allow passing a custom timeout to opencode run
#3498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Some models, like `gpt-5-pro`, can think for way longer than the default 5 minutes timeout. This PR allows the customization of this parameter.
|
I changed the proposition to a constant-based approach, which is less intrusive (does not appear in help, does not introduce new params to existing functions). This PR is still required for |
|
Do u still think this makes sense even with |
|
@AurelienRibon okay someone else asked for it: #3583 Can we make it a flag for the run command and drop the env var? |
|
@rekram1-node hey, sorry I took a day off with the wife and kid. I initially made it a flag, so I will just roll-back the latest changes to restore the flag behavior. Will do that tomorrow, you'll tell me if the result is fine. Only question I had in my mind when it was a CLI argument: what should it be named? I chose |
|
timeout is good, and hey no worries dont worry about being super responsive family takes priority and u are doing this for fun hope im not coming off as needing u to do things immediately! :) |
|
All done, I updated the PR description with new behavior examples. |
|
@actions-user, why you create conflicts?
|


Some models, like
gpt-5-pro, can think for way longer than the default 5 minutes timeout.This PR allows the customization of this parameter, with a new
--timeoutargument passed toopencode run.Does it work?
With a small timeout, we get a TimeoutError from

fetch, as expected.With a sufficient timeout, no error.

Without any custom timeout, no error.

EDIT
I just added support for timeout units (like
--timeout 60s). If no unit is provided,msis assumed.