Description
|
return JSON.parse(text) as Record<string, Provider> |
The access to models.dev was blocked by my network environment and returned HTML, causing opencode to fail to start.
Suggestions:
If JSON parsing fails here, the accessed link or file should be explicitly printed in the logs
When JSON parsing fails, return {} instead of failing to start
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
opencode/packages/core/src/models-dev.ts
Line 192 in ca354f8
The access to models.dev was blocked by my network environment and returned HTML, causing opencode to fail to start.
Suggestions:
If JSON parsing fails here, the accessed link or file should be explicitly printed in the logs
When JSON parsing fails, return {} instead of failing to start
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response