fix(web): Stop the catalog refresh from always timing out - #120
Merged
Merged
Conversation
The omp driver can spend 10 s on `models refresh` plus 12 s on `models --json`, so the 12 s batch cap failed the whole refresh whenever omp was slow. Discovery is all-or-nothing (WEB-59), so one slow harness meant a timeout every time. Raise the cap to 25 s; the call still returns as soon as every harness answers. Co-Authored-By: Claude <noreply@anthropic.com>
OpenCode v2 removed `models --refresh` and exits 1 with its usage text. The driver swallowed the error, so every catalog refresh cached zero opencode models. Retry with the plain `models` listing. Co-Authored-By: Claude <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The setup page's catalog refresh timed out on nearly every click. Two independent problems:
models refreshplus 12 s formodels --json. Discovery is all-or-nothing by design (WEB-59), so one slow omp run failed the whole refresh. The cap is now 25 s. It is an upper bound only: a real refresh on my machine finishes in about 3.5 s once every harness answers.models --refresh(it exits 1 and prints usage). The driver caught the error and returned[], so every refresh cached zero opencode models. It now retries with the plainmodelslisting, which returns 695 models in about 250 ms on opencode v2.0.15.I considered returning partial results when one harness is slow, but that contradicts WEB-59 (a refresh replaces the cache atomically) and would need its own spec change. Raising the cap fixes the observed failure without changing that contract.