Repository navigation
feat: Allow passing a custom timeout to opencode run - #3498
AurelienRibon wants to merge 73 commits into
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?
|
|
haha the stats auto update is running on your fork, there may be a way to disable that? Idk |
@rekram1-node Probably because I'm working from |
opencode runopencode run
|
@rekram1-node Can this be merged? We desperately need it for |


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.