Skip to content

[Bug] Desktop v1.17.14 Provider.list() TypeError crash - UI shows no models/providers on every startup #35772

Description

@shiy08166-lab

Bug Description

OpenCode Desktop v1.17.14 (Windows) crashes in Provider.list() on every startup with:

TypeError: Cannot read properties of undefined (reading 'provider')
    at Array.<anonymous> (.../node-C-Agor8X.js:687250:25)
    at Provider.list (.../node-C-Agor8X.js:694432:43)
    at Provider.list (definition) (.../node-C-Agor8X.js:687477:34)
    at ProviderHttpApi.list (.../node-C-Agor8X.js:402604:31)
    at ProviderHttpApi.list (definition) (.../node-C-Agor8X.js:694422:34)
    at Server.listen (.../node-C-Agor8X.js:696403:52)
    at Server.listen (definition) (.../node-C-Agor8X.js:696529:33)

The UI model selector is completely empty — no providers, no models. The CLI (opencode.exe from npm global install) works perfectly with the same ~/.config/opencode/opencode.json.

The crash was first noticed after installing the oh-my-openagent plugin. However, testing confirmed the crash persists even after removing the plugin and with a completely empty config, indicating it is a bug in the Desktop sidecar itself, not caused by the plugin.

Steps to Reproduce

  1. Install OpenCode Desktop v1.17.14 on Windows
  2. Open the app (with any opencode.json — even an empty {"model":"opencode/big-pickle"} triggers the crash)
  3. Check ~/.local/share/opencode/log/opencode.log for the TypeError
  4. Open the model selector in the UI — it is empty

What I Have Tried

  • Custom providers with npm field on every provider → still crashes
  • Single provider config → still crashes
  • Completely empty config ({"model":"opencode/big-pickle"} only)still crashes
  • Cleared ~/.cache/opencode/models.json → recreated on startup, still crashes
  • Removed oh-my-openagent from plugin array → still crashes
  • CLI with identical config → works perfectly

The crash persists regardless of configuration. It appears to be a bug in the Desktop sidecar's Provider.list() implementation in v1.17.14.

Environment

  • OS: Windows 11
  • OpenCode Desktop: v1.17.14 (Electron)
  • OpenCode CLI: npm global
  • Config: ~/.config/opencode/opencode.json with custom OpenAI-compatible providers
  • DB: ~/.local/share/opencode/opencode.db ~485MB

Key Logs

The error repeats 200+ times per startup session:

timestamp=2026-07-07T16:09:45.138Z level=ERROR run=db8127dc message=failed ref=err_4e1cf325 error="TypeError: Cannot read properties of undefined (reading 'provider')" cause="TypeError: Cannot read properties of undefined (reading 'provider')\n    at Array.<anonymous> (.../node-C-Agor8X.js:687250:25)\n    at Provider.list (.../node-C-Agor8X.js:694432:43)\n    at Provider.list (definition) (.../node-C-Agor8X.js:687477:34)\n    at ProviderHttpApi.list (.../node-C-Agor8X.js:402604:31)\n    at ProviderHttpApi.list (definition) (.../node-C-Agor8X.js:694422:34)\n    at Server.listen (.../node-C-Agor8X.js:696403:52)\n    at Server.listen (definition) (.../node-C-Agor8X.js:696529:33)"

renderer.log contains only benign warnings (ResizeObserver, aria-hidden). main.log shows sidecar spawns and server ready normally. The crash happens silently inside the sidecar's HTTP handler.

Impact

  • Desktop UI is completely unusable (no models, no providers)
  • CLI is unaffected (bypasses Provider.list)
  • This blocks all Desktop users who rely on the model selector UI

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions