Skip to content

feat: support deleting configured model providers (#301) - #369

Open
azaanaliraza wants to merge 3 commits into
truefoundry:mainfrom
azaanaliraza:feat/delete-model-providers
Open

feat: support deleting configured model providers (#301)#369
azaanaliraza wants to merge 3 commits into
truefoundry:mainfrom
azaanaliraza:feat/delete-model-providers

Conversation

@azaanaliraza

@azaanaliraza azaanaliraza commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Add support for deleting configured model providers through the
model-provider settings API and UI adapter.

Closes #301 - [Cannot delete configured model providers from Model Settings]

Changes

  • Added deleteProvider to IModelProviderStore.
  • Added PostgreSQL model-provider deletion.
  • Added SQLite model-provider deletion.
  • Added DELETE model-provider route.
  • Added DELETE model-provider handler.
  • Regenerated the TypeScript SDK so
    client.settings.modelProviders.delete(...) is available.
  • Updated the UI model-catalog adapter to expose deletion.
  • Added/updated tests for model-provider deletion.

How was this tested?

  • pnpm build passed.
  • pnpm test passed.
  • pnpm typecheck passed.
  • pnpm lint:ci passed.
  • pnpm format:check passed.
  • packages/trueforge-sdk tests passed:
    • 62 test files
    • 743 tests

Checklist

  • pnpm build passes
  • pnpm test passes
  • pnpm typecheck passes
  • pnpm lint:ci passes
  • pnpm format:check passes
  • Tests added/updated where appropriate
  • No unrelated changes
  • Docs / .env.example do not require updates

Note

Medium Risk
Deletes tenant configuration that agents may depend on for model routing; behavior is scoped and tested but operational impact if providers are removed while still in use.

Overview
Adds end-to-end support for removing a configured model provider by name, closing the gap where settings could create/update providers but not delete them.

The settings API exposes DELETE /api/v1/settings/model-providers/{name}, returning an empty 200 or 404 when the provider is missing. Persistence goes through a new deleteProvider on the model-provider store (Postgres and SQLite), tenant-scoped with a boolean indicating whether a row was removed.

The TypeScript SDK gains client.settings.modelProviders.delete(name) (including NotFoundError on 404), OpenAPI/docs are updated, and the TrueForge UI catalog adapter implements deleteModelProvider so existing Model Settings delete flows call the new API.

Tests cover store contracts, API handlers, SDK wire mocks, and a UI case confirming per-model trash still updates the provider manifest without invoking provider deletion.

Reviewed by Cursor Bugbot for commit eea4592. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eea4592

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@truefoundry/trueforge Minor
@truefoundry/trueforge-sdk Patch
@truefoundry/trueforge-ui Patch
frontend Patch

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

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ 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 98e9c89. Configure here.

Comment thread packages/trueforge/src/routes/modelProviderRoutes.ts
@chiragjn

chiragjn commented Aug 25, 2026

Copy link
Copy Markdown
Member

We can start a code review once the extra changes are cleaned up and branch is rebased to resolve conflicts

@azaanaliraza

azaanaliraza commented Aug 25, 2026

Copy link
Copy Markdown
Author

Fixed the conflicts

  • added a remove button and i removed the trash sign that removes the whole provider
Screenshot 2026-08-25 at 11 30 41 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot delete configured model providers from Model Settings

3 participants