Skip to content

feat: goose2 add support for custom providers in ui & acp#8924

Merged
kalvinnchau merged 8 commits intomainfrom
kalvin/custom-providers
Apr 30, 2026
Merged

feat: goose2 add support for custom providers in ui & acp#8924
kalvinnchau merged 8 commits intomainfrom
kalvin/custom-providers

Conversation

@kalvinnchau
Copy link
Copy Markdown
Collaborator

@kalvinnchau kalvinnchau commented Apr 29, 2026

Category: new-feature
User Impact: Users can now add and manage custom model providers from Goose 2 and use them in supported ACP workflows.
Problem: Custom providers were possible in lower-level configuration paths, but Goose 2 did not give users a complete setup and management flow, and ACP clients had no dedicated custom-provider methods. That made provider setup feel fragmented and made custom providers harder to discover, edit, or reuse.
Solution: This PR adds ACP custom-provider catalog and CRUD methods, wires Goose 2 to those methods through typed client helpers, and adds the settings and model-picker UI needed to create, edit, delete, and select custom providers.

File changes

crates/goose-cli/src/commands/configure.rs
Aligns CLI custom-provider setup with auth requirements so providers that do not require authentication do not store an API key.

crates/goose-sdk/src/custom_requests.rs
Adds typed ACP request and response DTOs for catalog listing, provider templates, and custom-provider create/read/update/delete operations.

crates/goose-server/src/routes/config_management.rs
Normalizes custom-provider API keys before saving so empty values are treated as absent credentials.

crates/goose/acp-meta.json
Registers the new custom-provider ACP methods so generated metadata exposes the new API surface.

crates/goose/acp-schema.json
Regenerates the ACP schema with custom-provider catalog, template, and CRUD request/response definitions.

crates/goose/src/acp/server.rs
Implements the ACP custom-provider methods and maps declarative provider data into ACP DTOs.

crates/goose/src/config/declarative_providers.rs
Expands declarative-provider support so custom provider metadata, auth state, and catalog-backed values can round trip cleanly.

crates/goose/tests/acp_custom_provider_methods_test.rs
Adds integration coverage for the ACP catalog and custom-provider CRUD methods.

ui/goose2/src/features/chat/hooks/tests/useAgentModelPickerState.test.ts
Covers model-picker state behavior for custom providers and provider inventory changes.

ui/goose2/src/features/chat/hooks/useAgentModelPickerState.ts
Updates model-picker state so custom-provider models can be surfaced and selected with the existing provider inventory.

ui/goose2/src/features/chat/hooks/useChatSessionController.ts
Propagates provider/model selection changes through chat session setup for the new custom-provider path.

ui/goose2/src/features/chat/types.ts
Extends chat provider/model typing to carry the custom-provider information needed by the picker and session flow.

ui/goose2/src/features/chat/ui/AgentModelPicker.tsx
Refactors the picker shell so the list rendering can handle custom providers without concentrating all provider UI in one component.

ui/goose2/src/features/chat/ui/AgentModelPickerItem.tsx
Adds a focused item component for provider/model rows in the picker.

ui/goose2/src/features/chat/ui/AgentModelPickerLists.tsx
Adds grouped picker list rendering for bundled and custom provider models.

ui/goose2/src/features/chat/ui/ChatInput.tsx
Passes custom-provider selection state into the chat input surface.

ui/goose2/src/features/chat/ui/ChatInputToolbar.tsx
Updates the toolbar wiring so the model picker can open with custom-provider-aware state.

ui/goose2/src/features/chat/ui/ChatView.tsx
Connects chat view state to the updated provider/model selection flow.

ui/goose2/src/features/chat/ui/tests/AgentModelPicker.test.tsx
Adds picker coverage for displaying and selecting custom-provider models.

ui/goose2/src/features/providers/api/customProviders.test.ts
Adds API-helper coverage for the ACP custom-provider methods.

ui/goose2/src/features/providers/api/customProviders.ts
Adds Goose 2 client helpers for listing templates and creating, reading, updating, and deleting custom providers.

ui/goose2/src/features/providers/hooks/useCustomProviders.test.tsx
Covers the custom-provider hook behavior for loading, saving, deleting, and refreshing provider state.

ui/goose2/src/features/providers/hooks/useCustomProviders.ts
Adds the main state hook for custom-provider CRUD workflows and provider inventory refreshes.

ui/goose2/src/features/providers/hooks/useProviderInventory.test.ts
Adds inventory coverage for merged bundled and custom-provider model data.

ui/goose2/src/features/providers/hooks/useProviderInventory.ts
Updates provider inventory loading so custom providers participate in the same model availability flow as bundled providers.

ui/goose2/src/features/providers/lib/customProviderDraft.test.ts
Adds coverage for converting custom-provider templates and existing configs into editable drafts.

ui/goose2/src/features/providers/lib/customProviderDraft.ts
Adds draft-building helpers used by the create and edit forms.

ui/goose2/src/features/providers/lib/customProviderHeaders.ts
Adds helpers for editing and validating custom HTTP headers.

ui/goose2/src/features/providers/lib/customProviderModels.ts
Adds model-list helpers for custom-provider form state.

ui/goose2/src/features/providers/lib/customProviderTypes.ts
Defines shared custom-provider UI types used across hooks, forms, and settings.

ui/goose2/src/features/providers/lib/customProviderValidation.ts
Adds validation for provider names, URLs, models, headers, and auth requirements before saving.

ui/goose2/src/features/providers/providerCatalog.test.ts
Adds coverage for provider catalog lookup and template metadata.

ui/goose2/src/features/providers/providerCatalog.ts
Refactors catalog exports around shared catalog entries and custom-provider lookup helpers.

ui/goose2/src/features/providers/providerCatalogEntries.ts
Moves the provider catalog entries into a dedicated module so templates can be reused across UI and tests.

ui/goose2/src/features/providers/ui/CustomHeadersEditor.tsx
Adds the form control for editing custom provider request headers.

ui/goose2/src/features/providers/ui/CustomProviderChoice.tsx
Adds the provider-choice UI for starting from a template or custom setup path.

ui/goose2/src/features/providers/ui/CustomProviderDialog.tsx
Adds the create/edit dialog that coordinates the custom-provider form flow.

ui/goose2/src/features/providers/ui/CustomProviderForm.tsx
Adds the main form for custom-provider details, auth, headers, streaming, and models.

ui/goose2/src/features/providers/ui/ProviderModelListEditor.tsx
Adds the model-list editor used when users define or adjust custom provider models.

ui/goose2/src/features/providers/ui/ProviderTemplatePicker.tsx
Adds the template picker for starting a custom provider from a known provider catalog entry.

ui/goose2/src/features/settings/ui/AgentProviderCard.tsx
Updates provider cards so custom providers display consistently with existing provider status and actions.

ui/goose2/src/features/settings/ui/ModelProviderRow.tsx
Adds row-level support for custom-provider metadata and actions in provider settings.

ui/goose2/src/features/settings/ui/ProvidersSettings.tsx
Adds the settings workflow for listing, creating, editing, deleting, and refreshing custom providers.

ui/goose2/src/features/settings/ui/SettingsModal.tsx
Wires provider settings into the updated custom-provider management flow.

ui/goose2/src/features/settings/ui/tests/ProvidersSettings.test.tsx
Adds settings coverage for the custom-provider create/edit/delete experience.

ui/goose2/src/features/settings/ui/customProviderFormAdapters.ts
Adds adapters between settings UI state and the shared custom-provider form draft model.

ui/goose2/src/shared/i18n/locales/en/settings.json
Adds English strings for custom-provider settings, validation, and dialogs.

ui/goose2/src/shared/i18n/locales/es/settings.json
Adds Spanish strings for the new custom-provider settings UI.

ui/goose2/src/shared/ui/alert-dialog.tsx
Adjusts shared alert-dialog behavior needed by the custom-provider delete confirmation flow.

ui/goose2/src/shared/ui/dialog.tsx
Updates shared dialog behavior and sizing for the custom-provider setup form.

ui/goose2/src/shared/ui/icons/ProviderIcons.tsx
Adds icon handling for custom providers and catalog-backed provider entries.

ui/goose2/src/shared/ui/select.tsx
Makes a small select styling adjustment used by the new provider form controls.

ui/sdk/src/generated/client.gen.ts
Regenerates the UI SDK client with the new ACP custom-provider methods.

ui/sdk/src/generated/index.ts
Regenerates SDK exports and method metadata for the new provider APIs.

ui/sdk/src/generated/types.gen.ts
Regenerates SDK TypeScript types for catalog, template, and custom-provider requests and responses.

ui/sdk/src/generated/zod.gen.ts
Regenerates SDK zod schemas for custom-provider ACP validation.

Reproduction Steps

  1. Open Goose 2 and go to Settings > Providers.
  2. Start the custom-provider flow, choose either a catalog template or a manual provider setup, fill in provider details, and save.
  3. Confirm the provider appears in the provider settings list with its configured status and available models.
  4. Open a chat, open the model picker, and confirm the custom-provider models appear alongside bundled providers.
  5. Select a custom-provider model and confirm the chat session uses that provider/model selection.
  6. From an ACP-capable client, call the custom-provider catalog and CRUD methods and confirm the same provider changes are reflected in Goose 2.

Screenshots/Demos

  • tested custom providers against all three engine types (just pointed to openai/anthropic,ollama directly)
  • tested using goose cli against the custom provider created in goose2 ui
❯ cargo run -p goose-cli --bin goose -- run --provider custom_testlocal --model qwen3.6 --text 'hi'
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.62s
     Running `target/debug/goose run --provider custom_testlocal --model qwen3.6 --text hi`

    __( O)>  ● new session · custom_testlocal qwen3.6
   \____)    20260429_154 · /Users/kalvin/Development/github.com/aaif-goose/goose
     L L     goose is ready
Hi. What can I help you with?
  • custom providers added via the cli, show up in the ui (after restart)
  • both ui/cli can add/manage both providers created in both spots
custom-providers.mov

@kalvinnchau kalvinnchau force-pushed the kalvin/custom-providers branch from 32f422f to 9be95d5 Compare April 30, 2026 15:48
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: 9be95d58e3

ℹ️ 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 crates/goose/src/config/declarative_providers.rs Outdated
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: a7f61c6f01

ℹ️ 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 crates/goose/src/acp/server.rs Outdated
use backend provider ids for the curated goose2 model catalog, add the missing planned providers, and keep icon rendering compatible for old aliases and unknown providers.
allow configured custom providers and curated declarative providers to contribute goose models while keeping local providers hidden from the setup/model lists.
expose provider catalog and custom provider crud through typed acp methods backed by goose core declarative provider storage. regenerate the acp schema and sdk types, and cover config compatibility and secret-cache invalidation in acp tests.
add typed goose2 api wrappers, draft validation helpers, custom-provider mutation state, and settings ui for creating, editing, and deleting custom providers through acp.
Custom provider read, update, and delete paths now permit legacy IDs with
punctuation, such as `custom_z.ai`, while preserving strict ID validation for
newly generated providers.

The file lookup path still rejects empty IDs, path separators, and control
characters so legacy compatibility does not reintroduce unsafe filesystem
access. ACP also defers to the core loader instead of pre-rejecting these
legacy IDs.
@kalvinnchau kalvinnchau force-pushed the kalvin/custom-providers branch from a7f61c6 to f0ebd1f Compare April 30, 2026 17:14
Copy link
Copy Markdown
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

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

Looks great!

@kalvinnchau kalvinnchau added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit ef73610 Apr 30, 2026
27 checks passed
@kalvinnchau kalvinnchau deleted the kalvin/custom-providers branch April 30, 2026 21:18
DOsinga pushed a commit that referenced this pull request Apr 30, 2026
Pulls in 7 new commits from main:
- #8932 break up acp/server.rs into submodules
- #8924 custom providers UI/ACP
- #8935 keep renamed skills open in detail view
- #8897 skill refactor (CreateSkillDialog -> SkillEditor)
- #8886 copy/content polish
- #8905 Gemini OAuth fix
- #8546 command injection patterns

Conflicts resolved:
- crates/goose/src/acp/server.rs: took main's split structure;
  added project-related plumbing (properties, project_id,
  include_project_sources) into crates/goose/src/acp/server/sources.rs.
- update_thread_metadata: pub(super) so server/sessions.rs (which
  hosts on_update_session_project) can call it.
- ui/goose2/src/features/skills/api/skills.ts: dropped
  directoryPath/editable (not on main's SkillInfo); kept our
  projectName/projectDir lookup from backend properties.
- ui/goose2/src/features/skills/ui/SkillEditor.tsx (renamed from
  CreateSkillDialog.tsx in #8897): kept main's structure; re-added
  our save-location picker (Global vs each project) and onSaved
  callback.
- ui/goose2/src/shared/i18n/locales/en/skills.json: took main's
  casing for editTitle/newTitle; kept our new keys (global,
  globalHint, projectHint, saveLocation).

Bumped useChatSessionController.ts file-size limit by 10 lines
(840 -> 850); justification updated to mention ACP project sync.
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