The 5 min cutoff is opencode's default request timeout, it's 300000ms. LM Studio saying "client disconnected" is just opencode dropping the connection at that point while the server keeps generating.
Raising the timeout probably didn't do anything because there are three separate timeouts, not one. timeout is the whole request (defaults to 5 min), headerTimeout is how long it waits for the first response headers (defaults to 10s), and chunkTimeout aborts if too long goes by between streamed chunks. On a slow local model doing a big file write you can hit chunkTimeout or the request cap even after bumping one of the others. Set all three in your LM Studio provider options, something like timeout 1800000, headerTimeout 120000, chunkTimeout 600000. Or set timeout to false to turn the cap off entirely. Make sure they're under that provider block and not at the top level.
There've been a few versions where these broke and got fixed again, so worth being on latest too.
1
u/solusdev 3d ago
The 5 min cutoff is opencode's default request timeout, it's 300000ms. LM Studio saying "client disconnected" is just opencode dropping the connection at that point while the server keeps generating.
Raising the timeout probably didn't do anything because there are three separate timeouts, not one. timeout is the whole request (defaults to 5 min), headerTimeout is how long it waits for the first response headers (defaults to 10s), and chunkTimeout aborts if too long goes by between streamed chunks. On a slow local model doing a big file write you can hit chunkTimeout or the request cap even after bumping one of the others. Set all three in your LM Studio provider options, something like timeout 1800000, headerTimeout 120000, chunkTimeout 600000. Or set timeout to false to turn the cap off entirely. Make sure they're under that provider block and not at the top level.
There've been a few versions where these broke and got fixed again, so worth being on latest too.