Skip to content

Commit 7e4a87b

Browse files
committed
fix: enable Save button when changing OpenRouter provider routing
- Modified setApiConfigurationField to exclude openRouterSpecificProvider from initial sync logic - This ensures changes to the provider routing setting properly trigger the Save button - Fixes #6655
1 parent 2882d99 commit 7e4a87b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
229229

230230
// Don't treat initial sync from undefined to a defined value as a user change
231231
// This prevents the dirty state when the component initializes and auto-syncs the model ID
232-
const isInitialSync = previousValue === undefined && value !== undefined
232+
// Exception: openRouterSpecificProvider should always trigger change detection
233+
const isInitialSync =
234+
previousValue === undefined && value !== undefined && field !== "openRouterSpecificProvider"
233235

234236
if (!isInitialSync) {
235237
setChangeDetected(true)

0 commit comments

Comments
 (0)