fix: The init_azure_openai() method in the core/hosting_configuration.py file doesn't work (#19704) (#19705)

Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
zhaobingshuang 2025-05-15 10:02:59 +08:00 committed by GitHub
parent 85eb55de37
commit 303c6ecc1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -897,6 +897,7 @@ class ProviderConfiguration(BaseModel):
)
except Exception as ex:
logger.warning(f"get custom model schema failed, {ex}")
continue
if not custom_model_schema:
continue
@ -909,9 +910,7 @@ class ProviderConfiguration(BaseModel):
custom_model_schema.model_type in model_setting_map
and custom_model_schema.model in model_setting_map[custom_model_schema.model_type]
):
model_setting = model_setting_map[custom_model_schema.model_type][
custom_model_schema.model
]
model_setting = model_setting_map[custom_model_schema.model_type][custom_model_schema.model]
if model_setting.enabled is False:
status = ModelStatus.DISABLED