Repository navigation
feat: allow deleting models, mcp, skills from settings - #876
Conversation
🦋 Changeset detectedLatest commit: 8ec02fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c13f694. Configure here.
c13f694 to
800a88e
Compare
Once an agent still uses the entry, retrying Remove is useless — keep the 409 as the message and leave only Close. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for the umbrella PR — this covers the three long-open issues (#301, #494, #498) and the confirm dialog is a better shape than what I built. I'm the Since the branch is 24 behind main I did a trial merge. 14 files conflict, but 7 are generated SDK/OpenAPI output. Of the 7 real ones, 6 are additive — your Two notes in case they help:
Happy to resolve the 6 additive conflicts and the |
Co-authored-by: Chris McKenzie <kristopolous@yahoo.com> Co-authored-by: Azaan Ali Raza <azaanalirazavi@gmail.com> Co-authored-by: Gadgitmatic <Gadgitmatic@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>

Summary
Fixes #301
Fixes #494
Fixes #498
Co-authors to be added from other PRs:
@kristopolous - #495, #499, #501, #502
@azaanaliraza - #369
@Gadgitmatic - #880
Settings entries (model providers, MCP servers, and skills) can now be deleted, but only when no configured agent still references them. If an agent still uses the entry, the API returns 409 naming those agents so the user can delete the agent first.
This also closes the hole where updating a model provider could drop a model an agent still pointed at, and adds a confirmation dialog (plus Connect on unauthenticated OAuth connectors in the list).
Changes
DELETEfor/api/v1/settings/model-providers/{name},/mcp-servers/{name}, and/skills/{name}PUTthat drops a model) with 409 whenlistAgentCatalogUsagefinds a referencing agentdeleteModelProvider/deleteSkill/deleteConnectorthrough the TrueForge catalog adaptersScreenshots
Configured connectors with Connect / Remove on the list:
Confirm before removing an unused connector:
Removing a provider's last model deletes the whole provider:
In-use catalog entries cannot be removed — Close only, no retry:
How was this tested?
listAgentCatalogUsageand catalogdelete*(SQLite)DELETEand in-use 409s (skills, MCP servers, model providers), including the model-providerPUTguardpnpm --filter @truefoundry/trueforge typecheckandpnpm --filter @truefoundry/trueforge-ui typecheckpnpm lint:ciandpnpm format:checkChecklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,python/trueforge_sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Changes settings admin APIs and deletes catalog data (including MCP OAuth grants), with referential checks but real impact on agent runtime configuration if misused.
Overview
Adds DELETE for settings model providers, MCP servers, and skills, plus SDK/OpenAPI support. Deletes (and model-provider updates that remove models) run
findCatalogUsageConflictvia newlistAgentCatalogUsageon the agent store; in-use entries return 409 with agent names. Deleting an MCP server also clears stored OAuth tokens and pending authorizations.The settings UI uses a shared
ConfirmDeleteDialog: confirm before remove, show API refusal in-dialog ("Can't remove …" + Close only). Model settings treat removing a provider's last model as deleting the whole provider. Connectors gain list-level Connect for unauthenticated OAuth servers and Remove wired through catalogdeleteConnector/deleteModelProvider/deleteSkilladapters.Reviewed by Cursor Bugbot for commit 8ec02fd. Bugbot is set up for automated code reviews on this repo. Configure here.