Repository navigation
Conversation
Lazy-load every console page, replace the shell's HeroUI controls with dependency-free primitives, load the update dialog on demand, and poll resources/live data less often. The embedded console now preloads only the entry, jsx-runtime and GSAP instead of the HeroUI shared chunk. Also summarize request logs with one SELECT and aggregate in Go; the 20k-row local benchmark drops from ~227 ms to ~57 ms per call.
API keys can enable a provider-neutral model view. Aggregation keys only see the aliases their granted accounts define, with duplicate aliases folded into one entry, and may only call those names. Ordinary key behavior is unchanged. Adds migration 030, key CRUD/settings plumbing, catalog aggregation, executor routing guards, key editor UI and bilingual notes.
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.
上线前确认(必读)
Stacked on #573
This PR is stacked on top of #573 (
feat/console-lazy-shell). The branch contains the two commits from #573 plus one aggregation commit:perf(console): cut first-screen payload and request stats scanstest: keep the full suite green on Windowsfeat(keys): add cross-provider model aggregation← the only commit that belongs to this PRMerge order: #573 first, then this PR. After #573 lands, rebase this branch onto
main; GitHub will then show only the aggregation commit. Do not merge this PR before #573.Summary
model_aggregation. Existing keys default tofalse, so ordinary key behavior is unchanged./v1/modelsreturns only the public aliases its granted accounts define. Duplicate aliases from different providers/accounts are folded into one entry; entries omitprovider,native_model,alias_of,regions,creditsandfree, and setowned_by: "aggregate".executor.Prepareaccepts only the bare aggregation alias for those keys; real model ids and provider-prefixed ids return400 model_not_aggregated.ResolveProviderFilterlets an aggregation key's bare alias search the full granted account pool.request_idmerge was implemented; a single request still routes to one upstream account.030_api_key_model_aggregation.sqlis new; shipped migration SQL bytes are untouched.Verification
On the final PR head (which includes #573):
cd frontend && npm run lint— 0 errors (62 pre-existing warnings)cd frontend && npm run build+node scripts/sync-static.mjs— pass; entry 422.55 kB / 134.97 kB gzipgo test ./... -count=1 -timeout 300s— pass (including migration 030 checksum, key CRUD round-trip, catalog aggregation and executor guards)go vet ./...— passpython scripts/release-notes.py validate— pass127.0.0.1:3011; verified in the in-app browser: aggregation key card badge, edit modal switch state, save round-trip, scrollable modal footer, and no console errors.TestExpandModelAliasesAddsPublicAlias,TestAggregateModelEntriesFoldsProviderAliases,TestPrepareAggregationKeyOnlyAcceptsItsAliases, plus API-key CRUD/store round-trips.Risk / rollout
/v1/modelsis empty by design.Rollback
Set the key's
model_aggregationback tofalse(or revert migration 030 in a follow-up). The column default keeps old keys unaffected.Closes no issue; follow-up to #573.