Skip to content

consolidate provider ACP methods onto inventory#8710

Merged
alexhancock merged 3 commits intomainfrom
baxen/provider-methods
Apr 21, 2026
Merged

consolidate provider ACP methods onto inventory#8710
alexhancock merged 3 commits intomainfrom
baxen/provider-methods

Conversation

@baxen
Copy link
Copy Markdown
Collaborator

@baxen baxen commented Apr 21, 2026

Category: improvement
User Impact: Users now get provider setup and selection data from a single ACP inventory endpoint instead of separate provider list and details methods.
Problem: Goose exposed separate ACP methods for provider list, provider details, and provider inventory even though clients in this repo were converging on the same underlying provider data. That duplication created drift in the contracts, including inconsistent configuration metadata and redundant maintenance across server handlers, schema generation, and UI consumers.
Solution: This change makes _goose/providers/inventory the single read surface for provider metadata plus live inventory state, migrates the in-repo clients to that endpoint, and removes the legacy list/details ACP methods and compat-only inventory fields. The result is a smaller ACP surface with one contract to maintain, while preserving the internal provider-option helper used for session config.

File changes

crates/goose-acp/acp-meta.json
Removed the legacy provider list and details method registrations so ACP metadata only advertises inventory-based provider reads.

crates/goose-acp/acp-schema.json
Regenerated the ACP schema to reflect the richer inventory entry shape, required metadata fields, and removal of the deprecated provider list/details methods.

crates/goose-acp/src/server.rs
Expanded inventory DTO mapping to include provider catalog metadata, removed the old ACP list/details handlers, and kept provider-option building as an internal helper for session config.

crates/goose-acp/tests/custom_requests_test.rs
Replaced the old list-provider coverage with inventory metadata assertions and restored the missing #[test] registration so the new path actually runs.

crates/goose-sdk/src/custom_requests.rs
Promoted inventory entry metadata into the SDK request/response contract, made catalog fields required, and removed the old list/details request and response types.

crates/goose/src/providers/inventory/mod.rs
Moved provider catalog metadata onto inventory entries and descriptors so the inventory service can serve both setup metadata and live model inventory from one source of truth.

ui/goose2/src/shared/api/acpApi.ts
Switched provider discovery to inventory-backed entries while preserving the synthetic default Goose provider for picker flows.

ui/goose2/tests/e2e/fixtures/tauri-mock.ts
Dropped the unused legacy provider-list mock branch now that UI callers only use inventory.

ui/sdk/src/generated/client.gen.ts
Regenerated the typed SDK client so provider inventory is the only provider-read custom method and its richer response shape is reflected in generated calls.

ui/sdk/src/generated/index.ts
Regenerated exported SDK method/type metadata after removing the legacy provider list/details ACP methods.

ui/sdk/src/generated/types.gen.ts
Regenerated TypeScript types so provider inventory entries carry required catalog/setup metadata and the old list/details types disappear.

ui/sdk/src/generated/zod.gen.ts
Regenerated Zod schemas so inventory metadata fields are required and the removed list/details contracts no longer parse.

ui/text/src/configure.tsx
Migrated the text configure flow to inventory-backed provider metadata, model loading, and configured-state checks.

ui/text/src/onboarding.tsx
Migrated onboarding provider selection and setup to inventory-backed metadata so it no longer depends on the removed details method.

  1. Run cargo test and confirm the ACP schema, SDK generation, and provider inventory changes compile and the unit/integration suite passes apart from any pre-existing live provider integration failures in your environment.
  2. Open the text onboarding or configure flow and verify provider selection, setup prompts, and model selection still work while sourcing metadata from _goose/providers/inventory.
  3. Inspect the generated ACP schema and SDK outputs to confirm _goose/providers/list and _goose/providers/details no longer appear and inventory entries expose description, defaultModel, providerType, configKeys, and setupSteps.

Validation: cargo fmt passed. cargo test completed with two failures in crates/goose/tests/providers.rs: test_codex_provider failed because the current Codex ChatGPT account does not support gpt-5.2-codex, and test_anthropic_provider failed on an existing live tool-output assertion mismatch.

Copy link
Copy Markdown
Collaborator

@alexhancock alexhancock left a comment

Choose a reason for hiding this comment

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

LGTM after the two commented things are addressed!


/// List providers available through goose, including the config-default sentinel.
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
#[request(method = "_goose/providers/list", response = ListProvidersResponse)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I would personally keep this naming for the converged thing. "Inventory" feels like it's something that shrinks and grows and is always changes but providers is more something we'll just keep adding to.

return zListProvidersResponse.parse(raw) as ListProvidersResponse;
}

async GooseProvidersDetails(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the TUI calls this one a couple times

const resp = await client.goose.GooseProvidersDetails({});

const resp = await client.goose.GooseProvidersDetails({});

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes update the use of this in this PR!

baxen added 3 commits April 21, 2026 11:43
Signed-off-by: Bradley Axen <baxen@squareup.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
@alexhancock alexhancock force-pushed the baxen/provider-methods branch from d817811 to bcd955c Compare April 21, 2026 15:51
Copy link
Copy Markdown

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

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: bcd955ce38

ℹ️ 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 on lines +2819 to 2820
Ok(ListProvidersResponse {
entries: entries.into_iter().map(inventory_entry_to_dto).collect(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy list response contract

This changes _goose/providers/list from the long-standing { providers: [{id,label}] } shape to { entries: [...] } without changing the method name, so existing ACP clients that haven’t regenerated against this commit will keep calling the same method and fail to deserialize the response at runtime. Because this is a wire-contract break on an existing method ID, it should keep backward-compatible providers output (or provide a compatibility alias) while migrating clients to the new inventory payload.

Useful? React with 👍 / 👎.

@alexhancock alexhancock added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit dfc5b0b Apr 21, 2026
26 checks passed
@alexhancock alexhancock deleted the baxen/provider-methods branch April 21, 2026 16:32
spikewang pushed a commit to spikewang/goose that referenced this pull request Apr 22, 2026
Signed-off-by: Bradley Axen <baxen@squareup.com>
lifeizhou-ap added a commit that referenced this pull request Apr 22, 2026
* main:
  feat: extend goose2 context window ux with auto-compaction (#8721)
  improve goose2 agent management flows (#8737)
  alexhancock/tui-improvements (#8736)
  fix: add strict:false to Responses API tools and gpt-5.4 to known models (#8636)
  persist and reliably apply chat model selection (#8734)
  merge goose-acp crate into goose (#8726)
  docs: AGENTS.md section on goose2 desktop backend architecture (#8732)
  feat: goose2 message bubble + action tray (#8720)
  consolidate provider ACP methods onto inventory (#8710)
  ci: declare and enforce MSRV of 1.91.1 (#8670)
  fix(ui): correct grammar in apps view description (#8668) (#8679)
  Stop load openai fast model for openapi compatible custom endpoint (#8644)
lifeizhou-ap added a commit that referenced this pull request Apr 22, 2026
* main: (41 commits)
  removed the specific code owner for documentation change (#8749)
  fix(providers): handle missing delta field in streaming chunks (#8700)
  refactor(providers): extract http_status module and rename handle_status_openai_compat (#8620)
  fix(providers/openai): accept streaming chunks with both reasoning fields (#8715)
  feat: associate threads with projects (#8745)
  upgrade goose sdk and tui to be compatible with the latest agentclientprotocol/sdk package (#8667)
  feat: extend goose2 context window ux with auto-compaction (#8721)
  improve goose2 agent management flows (#8737)
  alexhancock/tui-improvements (#8736)
  fix: add strict:false to Responses API tools and gpt-5.4 to known models (#8636)
  persist and reliably apply chat model selection (#8734)
  merge goose-acp crate into goose (#8726)
  docs: AGENTS.md section on goose2 desktop backend architecture (#8732)
  feat: goose2 message bubble + action tray (#8720)
  consolidate provider ACP methods onto inventory (#8710)
  ci: declare and enforce MSRV of 1.91.1 (#8670)
  fix(ui): correct grammar in apps view description (#8668) (#8679)
  Stop load openai fast model for openapi compatible custom endpoint (#8644)
  feat(hooks): add Husky git hooks for ui/goose2 (#8577)
  fix: links in chat could not be opened (#8544)
  ...
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.

2 participants