opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[Web UI] Selecting GPT-5 Nano model causes UI to hang with "Stale read from <Show>" error

Open Raviguntakala opened this issue 1 month ago • 0 comments

Description

When using opencode web and selecting GPT-5 Nano from the model selector, the web UI hangs and throws multiple JavaScript errors. The model is selectable in the Web UI but is explicitly disabled in the TUI.

Environment

OpenCode version

1.0.153

Steps to reproduce

Steps to Reproduce

  1. Run opencode web
  2. Open the web interface in browser
  3. Click on the model selector
  4. Select "GPT-5 Nano" (marked as "Free")
  5. Observe the UI becomes unresponsive

Expected Behavior

  • GPT-5 Nano should be disabled/unselectable in the Web UI (as it is in the TUI)
  • OR the model should work without errors

Actual Behavior

  • The UI hangs and becomes unresponsive
  • Console shows multiple errors (see screenshot)

Console Errors

Failed to load resource: the server responded with a status of 500

→ /session?directory=1

Uncaught Error: Stale read from <Show>.
 → at sC (index-DdNrjD8E.js:2:7307)
 → ...
 → Caused by: Stale read from <Show>.
Uncaught TypeError: Cannot read properties of null (reading 'style')
 → at disableBodyPointerEvents

Analysis

The TUI explicitly disables nano models in dialog-model.tsx:

disabled: provider.id === "opencode" && model.id.includes("-nano")

This disabled logic is not present in the Web UI, allowing users to select an unsupported model which triggers a cascade of errors.

Suggested Fix

Apply the same disabled logic for nano models in the Web UI's model selector component.

Screenshot and/or share link

Image

Operating System

macOS 15.3.2

Terminal

No response

Raviguntakala avatar Dec 16 '25 04:12 Raviguntakala