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
App bootstrap fetches the whole models.dev catalog from /provider on every start, once per project #47677
GET /provider always builds the full models.dev catalog. Measured against the HTTP API test
harness on this repo's dev, one call is 4,168,456 bytes and ~1.5 s, while the connected
providers in the same instance amount to 4,468 bytes — the catalog is 99.9% of the response.
The app bootstrap asks for that response even though it does not need the catalog yet:
bootstrapGlobal fetches loadProvidersQuery(scope, null, ...) once
(packages/app/src/context/global-sync/bootstrap.ts),
bootstrapDirectory fetches it again for every project directory,
and loadProvidersQuery carries no staleTime, so every consumer that mounts before the
bootstrap has written its result refetches the same payload.
Only the model picker needs the catalog. Everything else on the startup path — rendering the
currently selected model, the composer controls — needs the connected providers alone. On a slow
or unstable connection the catalog is what the startup waits for.
Related, but different: #44180 makes building the same response cheaper on the server
(memoization); this is about not asking for it during startup at all. #35897 asks for a cap or
pagination on the same endpoint, which is another way to cut the same payload.
In v2 the app no longer requests providers during startup, and the provider and model list endpoints return only the providers and models available to you instead of the full models.dev catalog. Provider and model lists for a project are loaded only when a view needs them. To get v2: npm i -g @opencode/cli@latest or curl -fsSL https://opencode.ai/v2/install | bash (desktop: update the app). If you still see this on v2, please open a new issue with the details.
Activity
neriousy commentedon Oct 19, 2026
In v2 the app no longer requests providers during startup, and the provider and model list endpoints return only the providers and models available to you instead of the full models.dev catalog. Provider and model lists for a project are loaded only when a view needs them. To get v2:
npm i -g @opencode/cli@latestorcurl -fsSL https://opencode.ai/v2/install | bash(desktop: update the app). If you still see this on v2, please open a new issue with the details.