Skip to content

Commit 575cf81

Browse files
committed
Pi: use full repo id + quant tag in models.json
Matches the form Hermes uses (org/repo:QUANT_TAG) — clearer than the bare basename and identical at runtime since llama-server ignores the model field.
1 parent 725c049 commit 575cf81

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/tasks/src/local-apps.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ curl -X POST "http://localhost:8000/v1/chat/completions" \\
138138

139139
expect(snippet[0].content).toContain(`llama-server -hf bartowski/Llama-3.2-3B-Instruct-GGUF:{{QUANT_TAG}}`);
140140
expect(snippet[1].setup).toContain("npm install -g @mariozechner/pi-coding-agent");
141-
expect(snippet[1].content).toContain(`"id": "Llama-3.2-3B-Instruct-GGUF"`);
141+
expect(snippet[1].content).toContain(`"id": "bartowski/Llama-3.2-3B-Instruct-GGUF:{{QUANT_TAG}}"`);
142142
expect(snippet[2].content).toContain("pi");
143143
});
144144

packages/tasks/src/local-apps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ const getLocalServerStep = (model: ModelData, filepath?: string): LocalAppSnippe
486486
};
487487

488488
const snippetPi = (model: ModelData, filepath?: string): LocalAppSnippet[] => {
489-
const modelName = model.id.split("/").pop() ?? model.id;
490489
const isMLX = isMlxModel(model);
490+
const modelId = isMLX ? model.id : `${model.id}${getQuantTag(filepath)}`;
491491
const serverStep = getLocalServerStep(model, filepath);
492492

493493
const modelsJson = JSON.stringify(
@@ -497,7 +497,7 @@ const snippetPi = (model: ModelData, filepath?: string): LocalAppSnippet[] => {
497497
baseUrl: "http://localhost:8080/v1",
498498
api: "openai-completions",
499499
apiKey: "none",
500-
models: [{ id: isMLX ? model.id : modelName }],
500+
models: [{ id: modelId }],
501501
},
502502
},
503503
},

0 commit comments

Comments
 (0)