Description
My network environment cannot reach https://models.dev/api.json.opencode periodically auto-fetches this URL on startup and in thebackground. Each failed attempt logs:
level=ERROR message="Failed to fetch models.dev"
cause="HttpClientError: Transport error (GET https://models.dev/api.json)"
These errors leak into the TUI and corrupt the layout behind the textinput area. Since I only use a manually configured model, the registryfetch is unnecessary for my workflow.
I'd like a config option (e.g. "models.dev.auto_fetch": false or"model_registry.fetch": "manual") in opencode.jsonc to:
- Disable the periodic auto-fetch of models.dev
- Suppress the related ERROR log
- Optionally allow a manual fetch via command when needed
Relevant log excerpts
The error appears 189 times in a single opencode.log, spanningacross days and persisting across TUI sessions:
timestamp=2026-06-11T02:55:21.574Z level=ERROR run=e038de2c
message="Failed to fetch models.dev"
cause="Cause([Fail(HttpClientError: Transport error
(GET https://models.dev/api.json) (cause: Error: The socket connection
was closed unexpectedly. For more information, pass `verbose: true`
in the second argument to fetch()))])"
timestamp=2026-06-11T02:59:01.762Z level=ERROR run=44ab922b
message="Failed to fetch models.dev"
cause="Cause([Fail(HttpClientError: Transport error
(GET https://models.dev/api.json) (cause: Error: The socket connection
was closed unexpectedly. ...))])"
timestamp=2026-06-30T11:05:43.193Z level=ERROR run=483673bb
message="Failed to fetch models.dev"
cause="Cause([Fail(HttpClientError: Decode error
(200 GET https://models.dev/api.json) (cause: Error: The socket
connection was closed unexpectedly. ...))])"
timestamp=2026-07-01T01:06:02.239Z level=ERROR run=e3cd7dcb
message="Failed to fetch models.dev"
cause=Cause([Fail(TimeoutError)])
Different error variants observed:
Transport error — socket reset (ECONNRESET)
Decode error — got HTTP 200 but connection died mid-response
TimeoutError — request timed out
The error fires repeatedly within minutes during the same sessionand resumes after restart. This confirms the auto-fetch runsperiodically with no backoff or stop mechanism.
Plugins
@mohak34/opencode-notifier@latest
OpenCode version
1.17.12
Steps to reproduce
- Run opencode in a network that cannot reach https://models.dev/api.json
(e.g. behind corporate proxy, VPN, or air-gapped environment)
- Observe the TUI — ERROR messages appear behind the text input area,
causing UI elements to shift and overlap
- Check opencode.log — repeated "Failed to fetch models.dev" entries
(189 occurrences in a single session in my case)
Screenshot and/or share link
Operating System
Windows (PowerShell 7)
Terminal
Windows Terminal
Description
My network environment cannot reach
https://models.dev/api.json.opencode periodically auto-fetches this URL on startup and in thebackground. Each failed attempt logs:These errors leak into the TUI and corrupt the layout behind the textinput area. Since I only use a manually configured model, the registryfetch is unnecessary for my workflow.
I'd like a config option (e.g.
"models.dev.auto_fetch": falseor"model_registry.fetch": "manual") in opencode.jsonc to:Relevant log excerpts
The error appears 189 times in a single
opencode.log, spanningacross days and persisting across TUI sessions:Different error variants observed:
Transport error— socket reset (ECONNRESET)Decode error— got HTTP 200 but connection died mid-responseTimeoutError— request timed outThe error fires repeatedly within minutes during the same sessionand resumes after restart. This confirms the auto-fetch runsperiodically with no backoff or stop mechanism.
Plugins
@mohak34/opencode-notifier@latest
OpenCode version
1.17.12
Steps to reproduce
(e.g. behind corporate proxy, VPN, or air-gapped environment)
causing UI elements to shift and overlap
(189 occurrences in a single session in my case)
Screenshot and/or share link
Operating System
Windows (PowerShell 7)
Terminal
Windows Terminal