pi-mtplx 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@ Restart Pi after installation.
16
16
 
17
17
  1. Install MTPLX (see its own docs).
18
18
  2. Download the model(s) you want, e.g. `mtplx install Youssofal/Qwen3.8-27B-MTPLX-Optimized-Quality`.
19
- 3. Register a downloaded model with Pi via `/mtplx` → **Models** (or add it manually to `~/.pi/agent/mtplx-models.json` and run `/reload`).
19
+ 3. Register a downloaded model with Pi via `/mtplx` → **Models** (or add it manually to `~/.pi/agent/mtplx-models.json`), then open `/model` to activate it.
20
20
 
21
21
  If you pick an MTPLX model that isn't installed, the server won't start — Pi will warn you. Use `mtplx list` to see what you've downloaded.
22
22
 
@@ -39,6 +39,8 @@ Run `/mtplx` to open an interactive menu:
39
39
  | **Models** | Register or unregister models — ✓ means registered (click to unregister), ✗ means available (click to register) |
40
40
  | **Uninstall** | Remove the `mtplx` provider from Pi's config |
41
41
 
42
+ > **To activate a model** after registering or unregistering it, open **`/model`** (or `/scoped-models`). pi-mtplx writes Pi's config files immediately, but Pi loads them into memory on startup; opening either picker refreshes that in-memory list. No `/reload` needed.
43
+
42
44
  ## Configuration
43
45
 
44
46
  ### Model registry
@@ -47,13 +49,13 @@ Models are registered in `~/.pi/agent/mtplx-models.json`. Each entry maps a Pi m
47
49
 
48
50
  ```json
49
51
  {
50
- "mtplx-qwen38-27b-optimized-quality": {
52
+ "mtplx-qwen3.8-27b-mtplx-optimized-quality": {
51
53
  "ref": "Youssofal/Qwen3.8-27B-MTPLX-Optimized-Quality"
52
54
  }
53
55
  }
54
56
  ```
55
57
 
56
- Register new models via the `/mtplx` → **Models** menu, or add entries manually to this file (then run `/reload`).
58
+ Register new models via the `/mtplx` → **Models** menu, or add entries manually to this file; then open `/model` (or `/scoped-models`) to activate them.
57
59
 
58
60
  ### Fan mode
59
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-mtplx",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Zero-config MTPLX integration for Pi coding agent",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -189,7 +189,7 @@ function readModelProfile(model: MtplxListedModel | undefined): ModelProfile {
189
189
  * Toggle registration of MTPLX models — register unregistered models,
190
190
  * unregister registered ones. Shows ✓/✗ marks to indicate status.
191
191
  *
192
- * Returns true if a change was made (user should /reload).
192
+ * Returns true if a change was made (open /model to apply it).
193
193
  */
194
194
  export async function manageModels(ctx: ExtensionContext): Promise<boolean> {
195
195
  const installed = await listMtplxModels();
@@ -209,7 +209,7 @@ export async function manageModels(ctx: ExtensionContext): Promise<boolean> {
209
209
  return `${mark} ${id} — ${ref}`;
210
210
  });
211
211
  choices.push("Cancel");
212
- const picked = await ctx.ui.select("MTPLX models — ✓ registered in Pi · ✗ available in MTPLX — run /reload after making changes", choices, undefined);
212
+ const picked = await ctx.ui.select("MTPLX models — ✓ registered in Pi · ✗ available in MTPLX — open /model after making changes", choices, undefined);
213
213
  if (!picked || picked === "Cancel") return false;
214
214
  const ref = picked.split(" — ").slice(1).join(" — ");
215
215
  const modelId = modelIdFromRef(ref);
@@ -223,7 +223,7 @@ export async function manageModels(ctx: ExtensionContext): Promise<boolean> {
223
223
  ctx.ui.notify(
224
224
  wasActive
225
225
  ? `Unregistered ${modelId} — still active for this session; it will drop from /model once you switch away.`
226
- : `Unregistered ${modelId}. Run /reload.`,
226
+ : `Unregistered ${modelId}. Open /model to apply.`,
227
227
  "info",
228
228
  );
229
229
  return true;
@@ -261,7 +261,7 @@ export async function manageModels(ctx: ExtensionContext): Promise<boolean> {
261
261
  }) as { models?: unknown[] };
262
262
  const models = Array.isArray(provider.models) ? (provider.models as unknown[]) : [];
263
263
  if (models.some((entry) => (entry as { id?: unknown }).id === modelId)) {
264
- ctx.ui.notify(`${modelId} is already registered — run /reload, then switch with /model.`, "info");
264
+ ctx.ui.notify(`${modelId} is already registered — open /model to refresh, then switch.`, "info");
265
265
  return false;
266
266
  }
267
267
  models.push({
@@ -291,7 +291,7 @@ export async function manageModels(ctx: ExtensionContext): Promise<boolean> {
291
291
  }
292
292
  // 3) Also enable the model in settings.json.
293
293
  enableModelInSettings(modelId);
294
- ctx.ui.notify(`Registered ${modelId} → ${ref}. Switch to it with /model.`, "info");
294
+ ctx.ui.notify(`Registered ${modelId} → ${ref}. Open /model to activate it.`, "info");
295
295
  return true;
296
296
  }
297
297
  /**