fix: auto-activate credential when provider record exists without act… (#33503)

This commit is contained in:
zyssyz123
2026-03-17 17:27:11 +08:00
committed by GitHub
parent 239e09473e
commit a592c53573
4 changed files with 43 additions and 3 deletions

View File

@ -196,6 +196,8 @@ class ProviderManager:
if preferred_provider_type_record:
preferred_provider_type = ProviderType.value_of(preferred_provider_type_record.preferred_provider_type)
elif dify_config.EDITION == "CLOUD" and system_configuration.enabled:
preferred_provider_type = ProviderType.SYSTEM
elif custom_configuration.provider or custom_configuration.models:
preferred_provider_type = ProviderType.CUSTOM
elif system_configuration.enabled: