Skip to content

TUI corrupted by auto-fetch of models.dev error log leaks #34730

Description

@klx1204

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:

  1. Disable the periodic auto-fetch of models.dev
  2. Suppress the related ERROR log
  3. 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

  1. Run opencode in a network that cannot reach https://models.dev/api.json
    (e.g. behind corporate proxy, VPN, or air-gapped environment)
  2. Observe the TUI — ERROR messages appear behind the text input area,
    causing UI elements to shift and overlap
  3. Check opencode.log — repeated "Failed to fetch models.dev" entries
    (189 occurrences in a single session in my case)

Screenshot and/or share link

Image

Operating System

Windows (PowerShell 7)

Terminal

Windows Terminal

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