Skip to content

feat: move goose2 provider catalog behind ACP layer - #9030

Merged
matt2e merged 13 commits into
mainfrom
kalvin/provider-catalog
May 6, 2026
Merged

feat: move goose2 provider catalog behind ACP layer#9030
matt2e merged 13 commits into
mainfrom
kalvin/provider-catalog

Conversation

@kalvinnchau

@kalvinnchau kalvinnchau commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: Users see provider setup options from Goose's backend catalog instead of a duplicated desktop-only list.
Problem: Goose2 maintained its own provider catalog, aliases, setup metadata, and provider labels in renderer code, which could drift from Goose core and made provider setup behavior harder to validate. Custom provider templates and setup entries also shared a DTO shape even though they represent different products.
Solution: This moves setup catalog ownership behind a typed ACP method, keeps custom provider templates on their existing catalog method with a renamed template DTO, and updates goose2 to consume generated SDK types with a small UI adapter where display names differ.

File changes

crates/goose-sdk/src/custom_requests.rs
Adds the typed setup catalog request/response DTOs and renames the custom provider catalog entry DTO to make the two contracts distinct.

crates/goose/acp-meta.json
Registers the new _goose/providers/setup/catalog/list ACP method for generated clients.

crates/goose/acp-schema.json
Regenerates ACP schema definitions for the setup catalog method and renamed template catalog DTO.

crates/goose/src/acp/server/custom_dispatch.rs
Adds ACP dispatch for the setup catalog list method.

crates/goose/src/acp/server/providers.rs
Maps Goose provider catalog domain entries into the new setup and template DTO shapes.

crates/goose/src/providers/catalog.rs
Adds backend-owned setup catalog metadata, setup field shaping, synthetic Goose entry support, and setup catalog tests.

crates/goose/tests/acp_custom_provider_methods_test.rs
Covers the new setup catalog ACP method and preserves existing custom provider catalog behavior.

ui/goose2/src/app/hooks/useAppStartup.ts
Loads the provider catalog during app startup and records load failures in catalog state.

ui/goose2/src/features/chat/hooks/tests/useResolvedAgentModelPicker.test.ts
Adds catalog-backed picker coverage for provider/model resolution.

ui/goose2/src/features/chat/hooks/useAgentModelPickerState.ts
Reads provider labels from the subscribed provider catalog instead of static entries.

ui/goose2/src/features/chat/hooks/useChatSessionController.ts
Uses catalog-backed agent resolution for session preparation and preserves safe compaction behavior for legacy Goose model-provider personas.

ui/goose2/src/features/chat/hooks/useResolvedAgentModelPicker.ts
Uses catalog-backed agent entries when resolving requested, stored, and default model selections.

ui/goose2/src/features/chat/ui/ChatInputToolbar.tsx
Subscribes to catalog entries for selected provider display labels.

ui/goose2/src/features/chat/ui/MessageBubble.tsx
Subscribes to catalog entries for assistant provider identity display.

ui/goose2/src/features/chat/ui/tests/MessageBubble.test.tsx
Seeds catalog entries so assistant identity tests assert the backend-catalog-backed labels.

ui/goose2/src/features/providers/api/catalog.test.ts
Covers setup catalog DTO mapping and fallback behavior.

ui/goose2/src/features/providers/api/catalog.ts
Adds the typed setup catalog API wrapper and the explicit DTO-to-view-model adapter.

ui/goose2/src/features/providers/api/customProviders.ts
Uses the renamed generated template DTO type for custom provider catalog calls.

ui/goose2/src/features/providers/hooks/useAgentProviderStatus.ts
Builds agent provider status from catalog entries and handles catalog loading/error state.

ui/goose2/src/features/providers/hooks/useCustomProviders.ts
Updates custom provider hooks to use the renamed template catalog type.

ui/goose2/src/features/providers/hooks/useProviderInventory.test.ts
Adds coverage for inventory filtering against loaded catalog entries.

ui/goose2/src/features/providers/hooks/useProviderInventory.ts
Filters provider inventory through subscribed model catalog entries.

ui/goose2/src/features/providers/lib/customProviderTypes.ts
Renames custom provider catalog types to match the generated template DTO contract.

ui/goose2/src/features/providers/lib/providerKey.ts
Centralizes provider key normalization for alias matching.

ui/goose2/src/features/providers/providerCatalog.test.ts
Updates selector and alias-resolution tests for backend-provided aliases and suffix matching.

ui/goose2/src/features/providers/providerCatalog.ts
Replaces static catalog helpers with store-backed selectors and catalog-entry resolution helpers.

ui/goose2/src/features/providers/providerCatalogAliases.ts
Deletes the renderer-owned alias table now supplied by the backend catalog.

ui/goose2/src/features/providers/providerCatalogEntries.ts
Deletes the renderer-owned provider catalog now supplied by Goose core.

ui/goose2/src/features/providers/stores/providerCatalogStore.ts
Adds the provider catalog Zustand store, Goose fallback entry, loading state, error state, and retryable load action.

ui/goose2/src/features/settings/ui/AgentProviderCard.tsx
Uses catalog-backed capability fields for install, auth, and visibility behavior.

ui/goose2/src/features/settings/ui/ModelProviderPanels.tsx
Accepts generated setup field placeholders that may be null.

ui/goose2/src/features/settings/ui/ProvidersSettings.tsx
Renders provider settings from the loaded catalog and shows inline catalog load errors with retry.

ui/goose2/src/features/settings/ui/tests/AgentProviderCard.test.tsx
Updates card fixtures for catalog-backed setup capabilities.

ui/goose2/src/features/settings/ui/tests/ModelProviderRow.test.tsx
Adds model provider row coverage using catalog-backed provider fields.

ui/goose2/src/features/settings/ui/tests/ProvidersSettings.test.tsx
Updates settings coverage for catalog-backed provider rendering and load state.

ui/goose2/src/features/settings/ui/customProviderFormAdapters.ts
Uses renamed custom provider template types in form adapters.

ui/goose2/src/shared/i18n/locales/en/settings.json
Adds English copy for provider catalog load error and retry affordances.

ui/goose2/src/shared/i18n/locales/es/settings.json
Adds Spanish copy for provider catalog load error and retry affordances.

ui/goose2/src/shared/types/providers.ts
Aliases generated setup DTO types and defines the small Goose2 view model used by UI code.

ui/sdk/src/generated/client.gen.ts
Regenerates the typed SDK client method for setup catalog listing.

ui/sdk/src/generated/index.ts
Regenerates SDK exports and method metadata for setup catalog listing.

ui/sdk/src/generated/types.gen.ts
Regenerates TypeScript DTOs for setup catalog entries and renamed template catalog entries.

ui/sdk/src/generated/zod.gen.ts
Regenerates Zod validators for the new setup catalog contract and renamed template catalog contract.

Reproduction Steps

  1. Open provider settings and confirm agent/model providers render from the catalog, including the built-in Goose agent.
  2. Disconnect or fail the catalog load path and confirm Settings shows an inline provider-catalog error with a retry action.
  3. Start a chat using Claude Code or Codex agent provider metadata and confirm labels/icons resolve from catalog aliases.
  4. Open custom provider templates and confirm the existing custom provider catalog flow still loads template entries.
  5. Run pnpm test -- --run in ui/goose2 and confirm the Vitest suite passes.
  6. Run the focused Rust ACP provider catalog tests and confirm the setup and template catalog contracts pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

const hasAllowedModelProvider = getModelProviders().some(
(provider) => providerAllowlist.has(provider.id),
);
store.setProviders(
providers.filter(
(provider) =>
provider.id !== "goose" || hasAllowedModelProvider,
),

P1 Badge Keep Goose provider when setup catalog is unavailable

When _goose/providers/setup/catalog/list fails (for example during startup races or backend/version mismatch), the catalog store stays on the Goose-only fallback, so getModelProviders() returns an empty list. In allowlisted distro builds this makes hasAllowedModelProvider false and the filter removes Goose (provider.id !== "goose" || hasAllowedModelProvider), leaving no selectable providers and blocking new chats until reload/retry succeeds.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/features/providers/hooks/useProviderInventory.ts
@kalvinnchau kalvinnchau changed the title feat: move goose2 provider catalog behind ACP feat: move goose2 provider catalog behind ACP layer May 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57344ca4c7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/app/hooks/useAppStartup.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e47803696f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/features/chat/hooks/useResolvedAgentModelPicker.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c182759ab

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/app/hooks/useAppStartup.ts Outdated
@kalvinnchau
kalvinnchau force-pushed the kalvin/provider-catalog branch from 6c18275 to 19de7e8 Compare May 5, 2026 22:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19de7e853e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/features/providers/hooks/useProviderInventory.ts Outdated
Comment thread ui/goose2/src/features/providers/providerCatalog.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90acdedc92

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/app/hooks/useAppStartup.ts Outdated
Comment thread ui/goose2/src/features/providers/hooks/useProviderInventory.ts Outdated
@kalvinnchau
kalvinnchau force-pushed the kalvin/provider-catalog branch from 90acded to 01165f2 Compare May 5, 2026 22:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d84f83c8b9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/features/chat/hooks/useAgentModelPickerState.ts Outdated
route unresolved model providers back through goose while the setup catalog is unavailable. keep unresolved providers as agents only when inventory identifies them as agent providers, and share that resolution path between picker hooks.

Signed-off-by: Kalvin Chau <kalvin@block.xyz>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b35dafc40e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/src/features/chat/hooks/useChatSessionController.ts
Comment thread ui/goose2/src/features/settings/ui/ProvidersSettings.tsx
matt2e added 3 commits May 6, 2026 11:05
Signed-off-by: Matt Toohey <contact@matttoohey.com>
The one-shot modelOrder initialization in ProvidersSettings ran as soon as
credentials loading finished, without waiting for the async provider catalog
to load. Since catalogEntries initially contains only the Goose fallback,
sortedModels was empty/minimal, locking in a useless order. When the real
catalog later loaded, modelOrder was no longer null so the curated
connected-first sort was never applied.

Gate the initialization on catalogLoaded so modelOrder is only set once the
full catalog entries are available.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Fall back to provider inventory categories while the ACP setup catalog is still loading so configured agent providers stay visible in the picker. Add hook coverage that configured inventory agents appear and unconfigured agents stay hidden before catalog load completes.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e enabled auto-merge May 6, 2026 01:31
@matt2e
matt2e added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit b17fd4f May 6, 2026
26 checks passed
@matt2e
matt2e deleted the kalvin/provider-catalog branch May 6, 2026 01:50
lifeizhou-ap added a commit that referenced this pull request May 6, 2026
* main:
  feat: move goose2 provider catalog behind ACP layer (#9030)
  fix: use python3 in developer extension instructions for macOS/Linux compatibility (#8784)
  fix(acp): synchronously reap ACP child to avoid SIGCHLD race (#9023)
  fix goose2 small-window chat and settings layouts (#9019)
  docs: improve goose2 AGENTS.md (#9028)
  agents: add CLAUDE.mds to mirror AGENTS.mds (#9029)
  remove skill categories (#9008)
  fix: 8531 - elicitation fixes (#8999)
  feat(chat): group consecutive tool calls into one summarized chain card (#8995)
  fix(ci): mark openai/gpt-5 smoke test as flaky (#9027)
  goose2 distribution bundling (#8911)
  Add "Trimmed trailing whitespace" message to moim whitelist (#8847)
show_only_when_installed: false,
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems to duplicate quite a lot of information from the existing provider registry, does it not?

shafqatevo pushed a commit to shafqatevo/goose that referenced this pull request Aug 7, 2026
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Matt Toohey <contact@matttoohey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants