Skip to content

Commit 01b0caf

Browse files
author
王斌
committed
feat: sorted the ai models
1 parent bc3a570 commit 01b0caf

File tree

1 file changed

+1
-1
lines changed
  • api/core/model_runtime/model_providers/__base

1 file changed

+1
-1
lines changed

api/core/model_runtime/model_providers/__base/ai_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def predefined_models(self) -> list[AIModelEntity]:
154154
# get all yaml files path under provider_model_type_path that do not start with __
155155
model_schema_yaml_paths = [
156156
os.path.join(provider_model_type_path, model_schema_yaml)
157-
for model_schema_yaml in os.listdir(provider_model_type_path)
157+
for model_schema_yaml in sorted(os.listdir(provider_model_type_path))
158158
if not model_schema_yaml.startswith("__")
159159
and not model_schema_yaml.startswith("_")
160160
and os.path.isfile(os.path.join(provider_model_type_path, model_schema_yaml))

0 commit comments

Comments
 (0)