You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/provider rebuilds and re-compresses a ~5.5MB payload on every web UI page load #44180
Every web UI page load calls GET /provider. The handler walks the whole models.dev catalog through deep clones + per-model schema validation, then JSON.stringifys ~5.5MB and gzips it — every single request. Measured ~700ms p50, 2s+ p95 under load; profiling showed ~33% of server CPU in schema validation and 13% in JSON.stringify. Under concurrent load this starves unrelated endpoints (p95 up to 11.7s elsewhere while /provider churned).
The four inputs (config, models.dev catalog, connected providers, credentials) are reference-stable between reloads, so the encoded payload could be memoized on input identity and invalidated when a reload swaps any input. Same for gzip/deflate of identical response bodies.
With such a patch I measured p50 726ms → 22ms and ~5 → ~205 req/s. Happy to send it.
Plugins
None
OpenCode version
1.18.21
Steps to reproduce
opencode serve with the web UI enabled and a populated models.dev cache
Open the web UI, watch GET /provider in the browser network tab across page reloads
Server re-validates and re-serializes the full catalog on every request; under concurrent load other endpoints slow down noticeably
Activity
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊