Fix: model selection format compat and provider api_key wrapping (#17112)

This commit is contained in:
chanx
2026-07-20 19:12:59 +08:00
committed by GitHub
parent 9a2a3c0459
commit b3f731d4de
7 changed files with 76 additions and 34 deletions

View File

@@ -62,7 +62,14 @@ export function buildModelTree(
title: instance,
children: models.reduce<TreeSelectNode[]>((acc, m) => {
const modelName = getRealModelName(m.name);
const id = m.model_id;
const id =
m.model_id ||
buildModelValue({
model_name: modelName,
model_instance: m.instance_name,
model_provider: m.provider_name,
});
if (seenLeafIds.has(id)) return acc;
seenLeafIds.add(id);
const leafNode: TreeSelectNode = {