GeezerVison is showing github.com — How to control Timeouts · Issue #1065 · anomalyco/opencode
How to control Timeouts #1065DescriptionI am running ollama on my local network on a dedicaled m4 24gig with Qwen3:14b Quant with 65k context window.
I had it create a slightly more than basic react app and it created things, wrote some of the thngs in the dialog and wrote 50% of the things to disk, the other 50 it didn't I gave it a command to write the rest of the items...and then it did some, but not all of it, i did another command to finish...and now it just timesout.
I am reading the ollama serve logs and noticed that open code is sending a timeout singnal around 4 min ond each time.
So...the issue is opencode.
I didn't set a timeout in the config. Then i tried setting a timeout in the opencode config to 600 seconds, same results.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ollama-local-remote": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "http://192.168.XX.XXX:11434/v1",
"timeout": 600000
},
"models": {
"llama3:8b": {"name": "Ollama Llama3"},
"qwen3:14b-65k": {
"name": "qwen3:14b 65k (remote local)",
"tools": true,
"reasoning": true,
"options": { "num_ctx": 65536 }
},
"qwen3:14b-q4_K_M": {
"name": "qwen3:14b-q4_K_M (remote local)",
"tools": true,
"reasoning": true
}
Is this the right way to do it? Or is this something that can't be changed. Thanks! OpenCode.ai special sauce is going to be for those homebuilds which are going to have less resources and as a result opencode needs to be able to wait longer. Love the community thoughts or is this coming soon. I think there was 3 releases yesterday so i know things are happening rapidly. Reacted by Nick Poorman, Vasiliy Kulikov, Paul Lesiak, Baptiste Gaillard, Kaan Tekiner, agentic-ai-forge and Emmanuel Bourg Reacted by ubergarm Activitythdxr commented on Jul 16, 2025 hmm im not sure where this timeout is being set - i don't think that timeout option exists mrbm commented on Jul 16, 2025 I am not attempted to be super familiar with the code base, but just a quick search brings me to this:
https://github.com/sst/opencode/blob/dev/packages/opencode/src/util/timeout.ts
Is there a way to set this project to wait a certain time length max or indefinitely? Or does this have a default waiting period occuring at some stage of the project? Maybe some &http.Client method has a default timeout? I'm in a dr office waiting with my eyes dialated so can't really see anymore.. but maybe these notes help douglarek commented on Jul 17, 2025 Maybe same as #655, opencode does not complete a download service but ends abruptly. My scenario is upgrading software packages in the Gentoo overlay. The download stops halfway, causing the Manifest that records the package to write an incorrect checksum. mrbm commented on Jul 17, 2025 mrbm commented on Jul 17, 2025 @thdxr i think the real pillar of strength that claude and google can't take from this project will be the ability to use local models which are obvious always going to run slower. I do think testing on a slow response scenario where from a separate machine running ollama might not response for 7 min while it thinks is a worthy test case to backtrack and find where open code might be closing the connection pre-maturely. Reacted by Rick Stoner, Alistair Stewart, k4ss4n, cyjin.yl, askoan and MichalNawrocik thdxr commented on Jul 24, 2025 Reacted by Gabriel Garrett, Rick Stoner, Julio Daniel Reyes, k4ss4n, Laelia-Succubus, Robert Baskette, Akira Makino, Roberto Canha, agentic-ai-forge and sleebu noahfraiture commented on Jul 28, 2025 I agree that timeout would be very convenient, but also for other capabilities like bash execution ggaabe commented on Jul 31, 2025 running into timeouts from slow local model responses as well. would be great to control. Reacted by Nick Poorman, Rick Stoner, bzessack, xqzhou, Roberto Canha and Avalanche Ridings dc-tec commented on Aug 1, 2025 Same here when running a larger local model, would be nice if we could configure the timeout. Reacted by bzessack, xqzhou and Roberto Canha Reacted by Emanuel López dysangel commented on Aug 3, 2025 same. My model was trying to do multiple tool calls and eventually timing out. I'd be happy to just be able to disable the timeout for local use Reacted by Rick Stoner, k4ss4n, KrisKennaway, Beshoy Girgis and Roberto Canha egyptianbman commented on Aug 9, 2025 Same here, getting constant timeouts with ollama. When this happens, the request is not aborted so the model keeps churning and subsequent requests are more likely to fail as the model is busy. dysangel commented on Aug 9, 2025 I've been looking into this the last few days. By default a lot of network requests time out after 5 minutes. I'm submitting a PR to mlx-lm to send back SSE comments which notify that the prompt is currently processing and keep the connection alive. If necessary we could make similar keepalive tweaks to ollama and llama.cpp etc to allow time for local models to process very large contexts without all the clients disconnecting jamviking commented on Aug 9, 2025 dysangel commented on Aug 9, 2025 @jamviking if you're using an MLX model, then yes that issue is still present Reacted by jamviking and eggp egyptianbman commented on Aug 18, 2025 dysangel commented on Aug 18, 2025 my fix for mlx-lm was merged into main, so if you set up an MLX server now, you should have no timeout issues eduardogarre commented on Aug 24, 2025 Also affected by this issue mrbm commented on Aug 24, 2025 Hey @thdxr just making sure you saw this and the solution somebody provided. adamwlarson commented on Aug 26, 2025 dannyfranca commented on Aug 30, 2025 1+, Using GPT-5 with Opencode and high reasoning is not practical at all. rekram1-node commented on Aug 31, 2025 support will be added in next release thx for your patience Reacted by Beshoy Girgis, Andrew Black, Seth Jones, Joshua Kuestersteffen, Stephen M. Clark, Danny França, Henrik Mohr, Artem R, eduardogarre and Chaos Cyrille37 commented on Nov 5, 2025 Thanks for timeout provider option, it works great.
I need an increased timeout with my computer without GPU wangsen992 commented on Dec 16, 2025
Thanks for timeout provider option, it works great.
I need an increased timeout with my computer without GPU
@Cyrille37 I'm look for a solution to this issue. Based on your comment it seems you managed to do this, may I ask how did you do it to enable longer timeouts? Thank you! rekram1-node commented on Dec 16, 2025 @wangsen992 what version are u on, what timeouts are u seeing? Cyrille37 commented on Dec 17, 2025 @wangsen992 Added timeout in provider's options config. Have a look at #3708 for an example. Cyrille37 commented on Dec 17, 2025 dysangel commented on Dec 17, 2025 @Cyrille37 thanks! I'll have to try open again sometime
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|