perf: deduplicate _goose/providers/list RPC call at startup#8873
Merged
perf: deduplicate _goose/providers/list RPC call at startup#8873
Conversation
loadProviders and loadProviderInventory both called
GooseProvidersList({providerIds: []}), sending two identical RPCs
through the sequential ACP message queue. Merge them into a single
loadProvidersAndInventory function that makes one RPC and derives
both the inventory entries and the ACP provider list from the same
response.
This eliminates one ~4s RPC from the startup critical path, reducing
the time listSessions is blocked behind provider queries.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nstants Export DEPRECATED_PROVIDER_IDS and DEFAULT_PROVIDER from acpApi.ts and import them in acp.ts instead of redeclaring identical values, ensuring a single source of truth. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…static import Address code review feedback: 1. Extract buildProviderListFromEntries() in acpApi.ts as the single code path for DEFAULT_PROVIDER prepend + DEPRECATED_PROVIDER_IDS filtering. Both listProviders() and discoverAcpProvidersFromEntries() now call this shared helper instead of duplicating the logic. 2. Replace the dynamic import() of discoverAcpProvidersFromEntries in useAppStartup.ts with a static import — it's a synchronous pure function that doesn't need lazy loading. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Remove the separate named import of buildProviderListFromEntries from acpApi and access it through the existing directAcp namespace import instead. This eliminates the redundant double import from the same module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
kalvinnchau
approved these changes
Apr 28, 2026
lifeizhou-ap
added a commit
that referenced
this pull request
Apr 30, 2026
* main: (24 commits) fix: copy and content improvements in goose2 (#8886) feat: make ollama host configurable in goose2 (#8912) polish sidebar navigation and project icons (#8896) fix: model picker stays usable during provider loading (#8900) feat: update provider row after saving credentials (#8914) feat: support google model inventory refresh (#8913) chore: Added goose 2 UI refactor review skill (#8903) blog: goose with peekaboo (#8884) blog: Built-in Local Inference blogpost. (#8808) perf: parallelize provider resolution and eagerly init SQLite pool (#8899) refactor: update goose2 credential management behind provider-scoped ACP/core API (#8887) fix: handle acp requests concurrently (#8781) build: set LLAMA_STATIC_CRT for Windows CUDA (#8901) perf: deduplicate _goose/providers/list RPC call at startup (#8873) chore: add a bit more instructions in the release pr (#8890) chore: disable spellcheck in model search (#8889) add skills to the chat composer (#8881) mergeable configs + cleanup (#8378) refactor: agent provider to use explicit type states (#8879) [goose2] MCP Apps: hydrate and replay app payloads in Goose2 (#8632) ...
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
loadProvidersandloadProviderInventorystartup calls into a singleloadProvidersAndInventoryfunction, eliminating a duplicate_goose/providers/listRPCbuildProviderListFromEntrieshelper inacpApi.tsso both the startup path andlistProvidersreuse the same logicdiscoverAcpProvidersFromEntriesinacp.tsto derive ACP providers from already-fetched inventory entries without an extra network callTest plan
pnpm test)🤖 Generated with Claude Code