fix(upstreams): show cached models when opening editor - #537
Merged
Merged
Conversation
Read model rows from the saved upstream snapshot on editor entry without waiting for discovery. Keep Custom discovery alongside the routable cache so overridden and rerank rows remain editable after reload. Remove unused editor loader requests and initial error state, cover cached/cold/empty catalog behavior, and make two WebSocket tests use their existing mocked upstream.
yyyr-p
added a commit
to yyyr-p/Floway
that referenced
this pull request
Sep 24, 2026
Integrates upstream commits e286553..b636cfd: - refactor(gateway): decouple model catalog reads from refresh (Menci#410) - fix(upstreams): show cached models when opening editor (Menci#537) - fix(gateway): fall back to fetch on Cloudflare socket rejection (Menci#532) - fix(responses): decrypt compaction summary aliases (Menci#530) - fix(web): keep request header labels readable (Menci#531) - fix(gateway): tolerate flat argument echoes in collaboration shim (Menci#529) Conflict resolutions: - data-plane/models/http.ts: adopt Menci#410's decoupled catalog signature (createModelsRefreshScheduler, loadModels(upstreamIds, scheduleRefresh, aliasRepo)) while preserving the fork's Claude Desktop UA admission (isClaudeCodeDiscoveryUserAgent) that upstream's renamed isClaudeCodeUserAgent no longer covers. - control-plane/routes.ts: union the schema imports — fork's OAuth2 admin bodies plus upstream's previewModelsBody from Menci#410; drop listModelsBody (removed by Menci#410). - data-transfer/routes_test.ts: union type imports and keep the fork's OAuth2 test fixtures; UpstreamRecord -> StoredUpstreamRecord (Menci#410 rename). - http_test.ts / users/routes_test.ts: migrate repo.upstreams.save() calls to saveUpstreamForTest() (UpstreamRepo.save was split into insertForModels/replaceForModels by Menci#410) and bare requestApp() calls to requestAppWithWarmModels() since Menci#410 serves persisted catalogs on cold reads. - migrations: renumber upstream's 0085_upstream_config_version.sql to 0091_upstream_config_version.sql to avoid colliding with the fork's 0085_oauth2_providers.sql; the two alter independent tables so apply order is unaffected. Update the backoff and migrate tests' filename references. Verified with pnpm run verify (typegen, lint, typecheck, 595 test files, test:installers, check:agents-md, check:generated-assets, check:verify-parity, build:web).
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
Existing Custom caches without an auto-discovery snapshot remain valid; their auto rows appear after the next model refresh.
Test Plan
pnpm run verify(585 test files, 6291 tests, installer harness, lint, typecheck, repository checks, and web build).