feat(config): add forced refresh for interval-fetched resources - #953
Merged
Merged
Conversation
Adds an External Data Refresh section to Network Settings that forces an immediate reload of all interval-fetched resources: OpenRouter / models.dev / Catwalk metadata, the pi.dev catalog overlay, and Codex / Claude Code CLI versions. Shows live progress during refresh and per-source results after. Backend: new GET /v0/management/catalog/status and POST /v0/management/catalog/refresh-all endpoints, plus a refresh_catalog plexus_operations MCP operation. Respects PLEXUS_MODEL_CATALOG_REFRESH=false and surfaces per-source failures including version-fetch errors.
Contributor
🔍 OpenCodeReview — detailed findings |
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.
Summary
Adds an External Data Refresh section to Network Settings that forces an immediate reload of every interval-fetched resource in one action: OpenRouter / models.dev / Catwalk model metadata, the pi.dev catalog overlay, and the Codex / Claude Code CLI versions. The UI shows live progress while the refresh runs and a per-source result breakdown (counts, provider refreshes, version before→after) when it finishes.
Why / Context
These resources refresh on fixed internal cadences — metadata every 60 minutes, pi.dev every 4 hours, CLI versions every 60 minutes — with no way to force an immediate reload. Waiting out a cadence was the only option when a new model or a fixed catalog entry needed to appear now. The existing "Refresh Metadata" button covered only the three metadata sources, leaving pi.dev and the version services out.
Changes
POST /v0/management/catalog/refresh-all, which refreshes metadata, the pi.dev overlay (forced), and both CLI versions in parallel, andGET /v0/management/catalog/statusfor cadence and current counts/versions.CodexVersionServiceandClaudeCodeVersionServicenow return an error string fromfetchVersion()instead of silently swallowing failures, and expose their configured auto-refresh interval.hadErrors, so a failed GitHub/npm lookup no longer reportssuccess: true.allowNetworkfromPLEXUS_MODEL_CATALOG_REFRESH, so the pi.dev network opt-out is honored by the manual path just as it is at startup.refresh_catalogoperation toplexus_operations, documented indocs/MCP.md.NetworkSettings.tsxwith an elapsed timer, per-source spinners during the run, and per-source pass/fail rows after; API client and types added alongside it.Testing
PLEXUS_MODEL_CATALOG_REFRESH=falseopt-out assertion.bun run typecheck,bun run lint:check,bun run format:checkall pass; affected suites 36/36 green.Notes / Follow-ups
The "Refresh Metadata" card is intentionally left in place — it targets metadata only, while this section covers the full set of interval-fetched resources.