"UnknownError" on startup #3700

Closed
opened 2026-02-16 17:41:09 -05:00 by yindo · 3 comments
Owner

Originally created by @FrancoStino on GitHub (Dec 20, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

opencode
{
"name": "UnknownError",
"data": {
"message": "TypeError: undefined is not an object (evaluating 'Provider2.sort(Object.values(item.models))[0].id')\n at (src/server/server.ts:1604:95)\n at o3 (../../node_modules/.bun/remeda@2.26.0/node_modules/remeda/dist/chunk-3ZJAREUD.js:1:137)\n at (src/server/server.ts:1604:22)\n at processTicksAndRejections (native:7:39)"
}
}

OpenCode version

1.0.180

Steps to reproduce

  1. opencode on terminal

Screenshot and/or share link

Image

Operating System

CachyOS

Terminal

Warp

Originally created by @FrancoStino on GitHub (Dec 20, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description opencode { "name": "UnknownError", "data": { "message": "TypeError: undefined is not an object (evaluating 'Provider2.sort(Object.values(item.models))[0].id')\n at <anonymous> (src/server/server.ts:1604:95)\n at o3 (../../node_modules/.bun/remeda@2.26.0/node_modules/remeda/dist/chunk-3ZJAREUD.js:1:137)\n at <anonymous> (src/server/server.ts:1604:22)\n at processTicksAndRejections (native:7:39)" } } ### OpenCode version 1.0.180 ### Steps to reproduce 1. opencode on terminal ### Screenshot and/or share link <img width="1391" height="231" alt="Image" src="https://github.com/user-attachments/assets/f052176d-450a-4f89-8cb8-8b86a591caf6" /> ### Operating System CachyOS ### Terminal Warp
yindo added the bug label 2026-02-16 17:41:09 -05:00
yindo closed this issue 2026-02-16 17:41:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 20, 2025):

This issue is a duplicate of #5858. Both report the same crash with identical error message:

TypeError: undefined is not an object (evaluating 'Provider2.sort(Object.values(item.models))[0].id')
at <anonymous> (src/server/server.ts:1604:95)

Please check #5858 for any updates or workarounds. You may be able to subscribe to that issue for updates.

@github-actions[bot] commented on GitHub (Dec 20, 2025): This issue is a duplicate of #5858. Both report the same crash with identical error message: ``` TypeError: undefined is not an object (evaluating 'Provider2.sort(Object.values(item.models))[0].id') at <anonymous> (src/server/server.ts:1604:95) ``` Please check #5858 for any updates or workarounds. You may be able to subscribe to that issue for updates.
Author
Owner

@ahosker commented on GitHub (Dec 20, 2025):

Run opencode models --refresh or rm ~/.cache/opencode/models.json to fix, this was a bad models.dev download. It should fix your problem.

@ahosker commented on GitHub (Dec 20, 2025): Run `opencode models --refresh` or `rm ~/.cache/opencode/models.json` to fix, this was a bad `models.dev` download. It should fix your problem.
Author
Owner

@rekram1-node commented on GitHub (Dec 20, 2025):

Gonna close this cause its fixed but ill leave the other one open for others:
https://github.com/sst/opencode/issues/5858

@rekram1-node commented on GitHub (Dec 20, 2025): Gonna close this cause its fixed but ill leave the other one open for others: https://github.com/sst/opencode/issues/5858
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3700