fix: a non-running instance is selected in creating benchmark

This commit is contained in:
jialin
2026-03-26 17:59:33 +08:00
committed by jialin
parent aa794c7646
commit 710e2e1996
+4 -1
View File
@@ -115,6 +115,7 @@ const ModelInstanceForm: React.FC = () => {
disabled: modelCategoriesMap.llm !== model.categories?.[0],
id: model.id,
isLeaf: false,
ready_replicas: model.ready_replicas,
children: []
}));
@@ -123,7 +124,9 @@ const ModelInstanceForm: React.FC = () => {
}
// preload instances for the first model
const selectedllmModel = modelOptions.find((model) => !model.disabled);
const selectedllmModel = modelOptions.find(
(model) => !model.disabled && model.ready_replicas > 0
);
if (!selectedllmModel) {
setModelList(modelOptions);
return;