Skip to content

Add model provider removal controls - #5352

Open
bingqilinweimaotai wants to merge 1 commit into
HKUDS:mainfrom
bingqilinweimaotai:feature/delete-model-provider
Open

Add model provider removal controls#5352
bingqilinweimaotai wants to merge 1 commit into
HKUDS:mainfrom
bingqilinweimaotai:feature/delete-model-provider

Conversation

@bingqilinweimaotai

Copy link
Copy Markdown
Contributor

Summary

  • add a WebUI mutation for removing model provider configuration
  • expose confirmation controls for built-in and custom providers
  • prevent removal while model presets or image generation still reference the provider
  • show localized, in-dialog feedback when removal is blocked

Why

The WebUI allowed providers to be created and updated, but it did not provide a way to remove saved credentials or delete custom providers. A removal flow also needs to preserve configuration integrity instead of leaving model presets with dangling provider references.

Behavior

  • Built-in providers have their saved configuration reset while remaining available in the provider catalog.
  • Custom providers are removed from the configuration entirely.
  • OAuth providers continue to use their existing sign-out flow.
  • Removal is rejected when a default or named model preset explicitly references the provider, including provider-prefixed models resolved through auto.
  • Custom providers used by image generation must be replaced there before deletion.
  • Validation failures remain visible in the confirmation dialog and are localized across the existing WebUI locales.

No changes were made to the agent loop or runner.

Validation

  • uv run --no-sync pytest tests/webui/test_settings_api.py tests/webui/test_settings_routes.py -q — 103 passed
  • vitest run src/tests/settings-providers.test.tsx — 10 passed
  • uv run --no-sync ruff check nanobot/webui/settings_models.py tests/webui/test_settings_api.py
  • tsc -p tsconfig.build.json
  • vite build
  • git diff --check

@bingqilinweimaotai
bingqilinweimaotai marked this pull request as ready for review August 12, 2026 08:39
@chengyongru chengyongru added feature priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. provider test webui labels Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. provider test webui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants