Repository navigation
Conversation
The full provider list (6.7 MB here, 227 providers and 8,452 models) is only read by the connect and model dialogs, but every bootstrap fetched and reconciled it.
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Author
3 of 6 tasks
Member
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
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.
Issue for this PR
Closes #47677
Type of change
What does this PR do?
Bootstrap no longer fetches
/provider.sync.providerCatalog()loads it intoprovider_nextwhen needed, at most once per bootstrap, and each bootstrap marks it stale so the next dialog refetches for the current directory.createDialogProviderOptionscalls it on mount, and the custom provider flow waits for it before checking whether the provider exists.Nothing else reads
provider_next. The prompt, model list anduseConnecteduseconfig.providers, which bootstrap still loads.In my build, over 24 session switches across directories, the blocking part of a directory reload went from a median 495 ms to 87 ms.
How did you verify your code works?
New test in
sync.test.tsx: bootstrap makes no/providerrequest, two concurrentproviderCatalog()calls make one request, and the next bootstrap makes it fetch again. TUI tests and typecheck pass. I also opened the connect dialog and model picker by hand in my build.Screenshots / recordings
No visual change, except the first time a connect dialog opens its provider list can take a few hundred ms to appear.
Checklist