feat: Settings UX should let you remove a model provider#1062
Merged
mpawlow merged 3 commits intoMar 10, 2026
Conversation
2 tasks
a67c97b to
dc67467
Compare
dc67467 to
cdf9e8b
Compare
cdf9e8b to
0c6d72c
Compare
mpawlow
commented
Mar 6, 2026
| </DialogFooter> | ||
|
|
||
| {showRemoveConfirm ? ( | ||
| <DialogFooter className="mt-4 flex items-center gap-2 rounded-lg border border-red-500/10 bg-red-500/5 px-4 py-3 animate-in fade-in-0 slide-in-from-bottom-2 duration-150"> |
Collaborator
Author
There was a problem hiding this comment.
(a) Implementation Note: Used standard animation found elsewhere in the OpenRAG application
Question for Reviewer: Does the selected animation effect & properties align with expectations?
mfortman11
requested changes
Mar 6, 2026
Collaborator
Author
Collaborator
Author
if os.getenv("OLLAMA_ENDPOINT"):
config_data["providers"]["ollama"]["endpoint"] = os.getenv("OLLAMA_ENDPOINT")
|
Collaborator
|
I think the usual pattern is just "Remove". Like "Are you sure you want to delete?" and the choices are "Cancel" or "Delete". |
0c6d72c to
57938ca
Compare
Collaborator
Author
Status Update
|
Issues: - #833 Summary Adds the ability for users to remove a configured model provider (OpenAI, Anthropic, IBM watsonx.ai, Ollama) from the Settings UI, with backend validation and automatic fallback to another configured provider. Frontend – Settings Dialogs - Added a "Remove" button to the Ollama, OpenAI, Anthropic, and watsonx settings dialogs, each gated by a tooltip explaining when removal is disabled - Added an inline confirmation footer (with animated slide-in) that appears before executing a destructive remove action, replacing the dialog close behavior - Disabled the remove action when no other provider is configured (prevents being locked out), with a tooltip explaining the reason - Displayed an inline error message from the mutation if the remove request fails Frontend – Mutation Layer - Extended useUpdateSettingsMutation to support the new remove_*_config boolean fields (remove_ollama_config, remove_openai_config, remove_anthropic_config, remove_watsonx_config) Backend – Settings API - Added remove_ollama_config, remove_openai_config, remove_anthropic_config, remove_watsonx_config optional boolean fields to SettingsUpdateBody - Implemented removal logic for each provider: clears credentials/endpoint, marks configured = False, and rejects the request with a 400 if no other provider is available - Added _first_configured_llm_provider and _first_configured_embedding_provider helpers to auto-select a fallback provider/model when the active LLM or embedding provider is removed - Ensured Langflow global variables and model values are refreshed after a provider removal (same as a provider update)
Issues: - #833 Summary Polished settings dialogs: form reset on open, autocomplete suppression, and label cleanup Form State & UX Fixes - Added useEffect to reset form state whenever a settings dialog is opened, preventing stale values from persisting across dialog sessions (Anthropic, OpenAI, Ollama, WatsonX) Password Field Improvements - Added autoComplete="new-password" to API key inputs in Anthropic, OpenAI, and WatsonX settings forms to suppress unwanted browser autofill suggestions Button Label Cleanup - Shortened the remove confirmation button label from "Confirm Remove" to "Remove" across all four provider dialogs (Anthropic, OpenAI, Ollama, WatsonX)
2aeb6f6 to
cc9e953
Compare
mfortman11
approved these changes
Mar 10, 2026
Issues: - #833 Summary - Extracted duplicated dialog footer logic into a shared ModelProviderDialogFooter component across all four provider settings dialogs. Refactor: Shared Dialog Footer Component - Created model-provider-dialog-footer.tsx — a new reusable ModelProviderDialogFooter component that encapsulates both the remove-confirmation footer state and the standard save/cancel footer with optional "Remove" button - Defined a typed ModelProviderDialogFooterProps interface covering all props needed to drive both footer states (pending flags, configured/canRemove guards, tooltip text, and all action callbacks) Refactored: Provider Settings Dialogs - Replaced the duplicated inline DialogFooter JSX (including Tooltip/TooltipProvider wrappers) in anthropic-settings-dialog.tsx, ollama-settings-dialog.tsx, openai-settings-dialog.tsx, and watsonx-settings-dialog.tsx with a single <ModelProviderDialogFooter /> usage each - Removed per-dialog imports of DialogFooter, Tooltip, TooltipContent, TooltipProvider, and TooltipTrigger that were no longer needed after extraction
Collaborator
Author
Status UpdateImplemented additional feedback from @mfortman11
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Issues
Summary
Frontend – Settings Dialogs
Frontend – Mutation Layer
Backend – Settings API
Form State & UX Fixes
Password Field Improvements
Button Label Cleanup
Refactor: Shared Dialog Footer Component
"Remove" button
Refactored: Provider Settings Dialogs
watsonx-settings-dialog.tsx with a single usage each
Screenshots
Screencaps
OpenRAG.and.3.more.pages.-.Work.-.Microsoft.Edge.2026-03-06.15-41-07.mp4