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
This commit is contained in:
Roo Code 2025-08-04 12:15:54 +00:00
parent 2882d99ea8
commit 7e4a87b709

View file

@ -229,7 +229,9 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
// Don't treat initial sync from undefined to a defined value as a user change
// This prevents the dirty state when the component initializes and auto-syncs the model ID
const isInitialSync = previousValue === undefined && value !== undefined
// Exception: openRouterSpecificProvider should always trigger change detection
const isInitialSync =
previousValue === undefined && value !== undefined && field !== "openRouterSpecificProvider"
if (!isInitialSync) {
setChangeDetected(true)