fix: expose source_model_id/source_version_id in model list payloads

format_response whitelists fields explicitly, so the new ModelScope
identity fields never reached the frontend: group badges rendered, but
card.dataset.modelId stayed empty and clicking 'N versions' silently
no-oped (handleViewLocalVersionsFromCard early-returns without it).
Found via browser E2E against a sandboxed standalone server.
This commit is contained in:
Will Miao
2026-09-26 07:35:36 +08:00
parent c48feeddb6
commit ede15032ce
4 changed files with 8 additions and 0 deletions
+2
View File
@@ -69,6 +69,8 @@ class CheckpointService(BaseModelService):
"version_count": model_data.get("version_count"),
"source_platform": model_data.get("source_platform", ""),
"source_url": model_data.get("source_url", ""),
"source_model_id": model_data.get("source_model_id", ""),
"source_version_id": model_data.get("source_version_id", ""),
"hf_url": model_data.get("hf_url", ""),
}
+2
View File
@@ -69,6 +69,8 @@ class EmbeddingService(BaseModelService):
"version_count": model_data.get("version_count"),
"source_platform": model_data.get("source_platform", ""),
"source_url": model_data.get("source_url", ""),
"source_model_id": model_data.get("source_model_id", ""),
"source_version_id": model_data.get("source_version_id", ""),
"hf_url": model_data.get("hf_url", ""),
}
+2
View File
@@ -81,6 +81,8 @@ class LoraService(BaseModelService):
"version_count": model_data.get("version_count"),
"source_platform": model_data.get("source_platform", ""),
"source_url": model_data.get("source_url", ""),
"source_model_id": model_data.get("source_model_id", ""),
"source_version_id": model_data.get("source_version_id", ""),
"hf_url": model_data.get("hf_url", ""),
}
+2
View File
@@ -69,6 +69,8 @@ class OtherModelService(BaseModelService):
"version_count": model_data.get("version_count"),
"source_platform": model_data.get("source_platform", ""),
"source_url": model_data.get("source_url", ""),
"source_model_id": model_data.get("source_model_id", ""),
"source_version_id": model_data.get("source_version_id", ""),
"hf_url": model_data.get("hf_url", ""),
}