fix: customize model credentials were invalid despite the provider credentials being active (#8864)

This commit is contained in:
takatost 2024-09-28 15:54:26 +08:00 committed by GitHub
parent 6cd22f3bca
commit 49af18fbd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,7 +119,7 @@ class ProviderConfiguration(BaseModel):
credentials = model_configuration.credentials
break
if self.custom_configuration.provider:
if not credentials and self.custom_configuration.provider:
credentials = self.custom_configuration.provider.credentials
return credentials