fix: when create provider credential set the provider record to vaild (#26868)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
非法操作 2025-10-14 19:42:48 +08:00 committed by GitHub
parent 9e39be0770
commit 7b51320346
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -472,6 +472,9 @@ class ProviderConfiguration(BaseModel):
provider_model_credentials_cache.delete()
self.switch_preferred_provider_type(provider_type=ProviderType.CUSTOM, session=session)
else:
# some historical data may have a provider record but not be set as valid
provider_record.is_valid = True
session.commit()
except Exception: