Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 455ae53

Browse files
authored
fix: model id parsing breaks model pull (#816)
1 parent d87bbe2 commit 455ae53

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

cortex-js/src/usecases/models/models.usecases.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ export class ModelsUsecases {
327327
throw new BadRequestException('Model already exists');
328328
}
329329

330-
// ONNX only supported on Windows
331330
const modelsContainerDir = await this.fileManagerService.getModelsPath();
332331

333332
if (!existsSync(modelsContainerDir)) {

cortex-js/src/utils/huggingface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export async function fetchJanRepoData(
116116
): Promise<HuggingFaceRepoData> {
117117
const repo = modelId.split(':')[0];
118118
const tree = await parseModelHubEngineBranch(
119-
modelId.split(':')[1] ?? !modelId.includes('/') ? 'default' : '',
119+
modelId.split(':')[1] ?? (!modelId.includes('/') ? 'default' : ''),
120120
);
121121
const url = getRepoModelsUrl(
122122
`${!modelId.includes('/') ? 'cortexso/' : ''}${repo}`,

0 commit comments

Comments
 (0)