Skip to content

"Upstream idle timeout exceeded" #31456

Closed as not planned
Closed as not planned

Description

@gitpilotco

Description

While working on a project, the Nemetron 3 Ultra Free model takes a long time to respond and then stops working, displaying the error "Upstream idle timeout exceeded".

Plugins

OpenCode windows desktop

OpenCode version

v1.16.2

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Windows 11 tinny

Terminal

No response

Activity

  1. github-actions commented on Jun 9, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review the above issues to see if they describe the same problem. If so, consider adding your information there instead.

  2. gitpilotco commented on Jun 9, 2026

    @gitpilotco
    Author

    {
    "requestOptions": {
    "timeout": 3600000
    }
    }
    As a temporary solution, I'm increasing the waiting time for opencode.jsonc. I don't know how useful this is.

  3. Germanized commented on Jun 15, 2026

    @Germanized

    i think i fixed it by doing this to my config

    {
    "$schema": "https://opencode.ai/config.json",

    "provider": {
    "openai": {
    "options": {
    "timeout": 3600000
    }
    },
    "anthropic": {
    "options": {
    "timeout": 3600000
    }
    },
    "openrouter": {
    "options": {
    "timeout": 3600000
    }
    },
    "google": {
    "options": {
    "timeout": 3600000
    }
    }
    }
    }

    the config is loacated at C:\Users(URUSERNAMEDUMMY).config\opencode

  4. Germanized commented on Jun 15, 2026

    @Germanized

    $ErrorActionPreference = "Stop"
    $chunkTimeoutMs = 2147483647
    $stamp = Get-Date -Format "yyyyMMdd-HHmmss"

    Close OpenCode processes if any are still alive.

    Get-Process -ErrorAction SilentlyContinue | Where-Object {
    $.ProcessName -like "opencode" -or
    ($(try { $
    .Path } catch { "" }) -like "opencode")
    } | Stop-Process -Force -ErrorAction SilentlyContinue

    Start-Sleep -Seconds 2

    Reset the bloated Desktop GUI store, but keep a backup.

    $desktopDir = Join-Path $env:APPDATA "ai.opencode.desktop"
    $store = Join-Path $desktopDir "opencode.global.dat"

    if (Test-Path $store) {
    Rename-Item -LiteralPath $store -NewName "opencode.global.dat.$stamp.bak"
    Write-Host "Backed up GUI store: opencode.global.dat.$stamp.bak"
    }

    Get-ChildItem -Path $desktopDir -Filter "opencode.global.dat.tmp-*" -ErrorAction SilentlyContinue |
    Remove-Item -Force -ErrorAction SilentlyContinue

    Create/update OpenCode global config for OpenRouter timeout.

    $cfgDir = Join-Path $env:APPDATA "opencode"
    $cfg = Join-Path $cfgDir "opencode.json"

    New-Item -ItemType Directory -Force -Path $cfgDir | Out-Null

    if (Test-Path $cfg) {
    Copy-Item -LiteralPath $cfg -Destination "$cfg.$stamp.bak" -Force
    $data = Get-Content -LiteralPath $cfg -Raw | ConvertFrom-Json
    } else {
    $data = [pscustomobject]@{}
    }

    function Set-Prop($obj, [string]$name, $value) {
    if ($obj.PSObject.Properties[$name]) {
    $obj.PSObject.Properties[$name].Value = $value
    } else {
    $obj | Add-Member -NotePropertyName $name -NotePropertyValue $value
    }
    }

    function Ensure-Obj($obj, [string]$name) {
    if (-not $obj.PSObject.Properties[$name] -or $null -eq $obj.PSObject.Properties[$name].Value) {
    Set-Prop $obj $name ([pscustomobject]@{})
    }
    return $obj.PSObject.Properties[$name].Value
    }

    Set-Prop $data '$schema' 'https://opencode.ai/config.json'
    $provider = Ensure-Obj $data 'provider'
    $openrouter = Ensure-Obj $provider 'openrouter'
    $options = Ensure-Obj $openrouter 'options'

    Set-Prop $options 'timeout' $false
    Set-Prop $options 'chunkTimeout' $chunkTimeoutMs

    $data | ConvertTo-Json -Depth 32 | Set-Content -LiteralPath $cfg -Encoding UTF8

    Write-Host "Done. OpenRouter chunkTimeout set to $chunkTimeoutMs ms."
    Write-Host "Restart OpenCode."

    This PS1 script slash chunk should help with the caching issues that makes the GUI feel really laggy especially for me and also the time out

  5. github-actions commented on Aug 15, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions