pi-multimodal-proxy 1.16.0 → 1.17.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.17.0] - 2026-08-27
8
+
9
+ ### Changed
10
+
11
+ - **Default vision model is now GLM 5.3 Flash (`zai/glm-5.3-flash`).** `DEFAULT_CONFIG` ships `zai/glm-5.3-flash` (image input, 1M context, $0.075/M input — $0.25/M output) as the default image-description model, replacing `anthropic/claude-sonnet-5`. Implicit configs keep tracking the package default: `anthropic/claude-sonnet-5` was added to `LEGACY_DEFAULT_MODELS` (so configs that merely inherited Sonnet 5 upgrade to GLM 5.3 Flash once it's in the catalog), `DEFAULT_MODEL_FALLBACKS` now tries `anthropic/claude-sonnet-5` and then `anthropic/claude-sonnet-4-5` on catalogs without GLM 5.3 Flash, and explicit choices (`modelExplicit`, `PI_VISION_PROXY_MODEL`) are never rewritten. README (What's new, env-table default, privacy note, requirements) and the `/multimodal-proxy model` usage example updated to the new default.
12
+
13
+ ## [1.16.1] - 2026-08-22
14
+
15
+ ### Fixed
16
+
17
+ - **Syntax error in the interactive config menu** (v1.16.0 regression): the "Fallback model" handler opened `ctx.ui.input(` with a stray trailing quote, making the whole `vision-proxy.ts` extension unparseable for pi's jiti/oxc loader (`Unterminated string constant` at `vision-proxy.ts:3790`). Every pi process loading the package crashed at startup — daemons crash-looped until the extension was removed or the file hand-patched. `node --check` (swc) accepts the broken construct, so it slipped through the existing gates.
18
+ - The shipped file is now byte-identical to the hand-patched copy that has been running in production.
19
+
20
+ ### Added
21
+
22
+ - **Syntax gate for shipped extensions** (`npm run check`, `tools/check-syntax.mjs`): parses every `.ts` under `extensions/` with the TypeScript parser and fails on any parse diagnostic — a parser that actually rejects the class of error that shipped. Wired into `release.yml` before `npm test`, so an unparseable extension can no longer reach npm.
23
+
7
24
  ## [1.16.0] - 2026-08-17
8
25
 
9
26
  ### Added
package/README.md CHANGED
@@ -8,6 +8,10 @@ When **video or audio files** are detected, they are routed to a **multimodal mo
8
8
 
9
9
  **YouTube links** are detected too: paste a URL (`youtube.com/watch?v=…`, `youtu.be/…`, `/shorts/…`, etc.) and the video is downloaded with [`yt-dlp`](https://github.com/yt-dlp/yt-dlp) and analyzed exactly like a local file.
10
10
 
11
+ ## What's new in 1.17.0
12
+
13
+ - **Default vision model is now GLM 5.3 Flash** (`zai/glm-5.3-flash`) — fast, cheap image description ($0.075/M input, $0.25/M output) with a 1M-token context window. Models you never chose explicitly track the package default: configs that merely inherited the old default (`anthropic/claude-sonnet-5`) are upgraded when GLM 5.3 Flash is in the catalog, and on Pi versions without it the default falls back to `anthropic/claude-sonnet-5` (then `anthropic/claude-sonnet-4-5` on the oldest catalogs). Models chosen explicitly — via `/multimodal-proxy model`, `pick`, or `PI_VISION_PROXY_MODEL` — are never rewritten. **Heads-up:** the default provider is now Z.ai — you need a `zai` API key and will be asked for first-use data-egress consent unless you pin a different model (e.g. `/multimodal-proxy model anthropic/claude-sonnet-5`).
14
+
11
15
  ## What's new in 1.16.0
12
16
 
13
17
  Reliability features borrowed from a survey of [atlas-vision-mcp](https://github.com/QuangThai/vision-bridge-mcp) (ideas worth stealing, implementation our own):
@@ -157,7 +161,7 @@ Legacy alias: /vision-proxy <args> works identically.
157
161
  | Variable | Values | Default |
158
162
  |----------|--------|---------|
159
163
  | `PI_VISION_PROXY_MODE` | `fallback`, `always`, `off` | `fallback` |
160
- | `PI_VISION_PROXY_MODEL` | `provider/model-id` | `anthropic/claude-sonnet-5` |
164
+ | `PI_VISION_PROXY_MODEL` | `provider/model-id` | `zai/glm-5.3-flash` |
161
165
  | `PI_VISION_PROXY_INCLUDE_CONTEXT` | bool | `true` |
162
166
  | `PI_VISION_PROXY_TOOL` | `on`, `off` | `on` |
163
167
  | `PI_VISION_PROXY_MAX_IMAGES_PER_CALL` | 1–20 | `10` |
@@ -306,7 +310,7 @@ When a model is in the grounding registry, a format-specific instruction is appe
306
310
 
307
311
  ## Privacy & security
308
312
 
309
- This extension **sends data to a third-party provider**. By default that is `anthropic/claude-sonnet-5` for images (`anthropic/claude-sonnet-4-5` on older Pi versions without Sonnet 5 in the catalog) and `xai/grok-4.3` for video/audio. Be aware:
313
+ This extension **sends data to a third-party provider**. By default that is `zai/glm-5.3-flash` for images (`anthropic/claude-sonnet-5` on older Pi versions without GLM 5.3 Flash in the catalog, then `anthropic/claude-sonnet-4-5`) and `xai/grok-4.3` for video/audio. Be aware:
310
314
 
311
315
  1. **Image and video data is uploaded** to the configured provider on every proxied request. Crop coordinates are applied locally before upload — only the cropped region is sent.
312
316
  2. **Recent conversation context** (last 8 messages, truncated) is uploaded with the image unless you set `/multimodal-proxy context off` or `PI_VISION_PROXY_INCLUDE_CONTEXT=false`. Disable it for sensitive sessions.
@@ -325,7 +329,7 @@ For the full security audit see [`SECURITY-REVIEW.md`](./SECURITY-REVIEW.md).
325
329
 
326
330
  ## Requirements
327
331
 
328
- - A vision-capable model with a valid API key (e.g. Claude, GPT-4o, Gemini, Qwen-VL)
332
+ - A vision-capable model with a valid API key (e.g. GLM 5.3 Flash, Claude, GPT-4o, Gemini, Qwen-VL)
329
333
  - For video/audio: a multimodal model that supports video input (e.g. Grok 4.3, Gemini 2.5 Pro)
330
334
  - The models must be registered in Pi (built-in or via `models.json`)
331
335
 
@@ -681,8 +681,8 @@ export const DEFAULT_VIDEO_SYSTEM_PROMPT = [
681
681
 
682
682
  export const DEFAULT_CONFIG: VisionConfig = {
683
683
  mode: "fallback",
684
- provider: "anthropic",
685
- modelId: "claude-sonnet-5",
684
+ provider: "zai",
685
+ modelId: "glm-5.3-flash",
686
686
  systemPrompt: [
687
687
  "You are a precise image analysis assistant.",
688
688
  "Describe the image factually for a downstream agent that may act on the description.",
@@ -1261,9 +1261,10 @@ export function resolveConfig(
1261
1261
 
1262
1262
  /**
1263
1263
  * Ordered fallbacks tried when the built-in default vision model is missing
1264
- * from the model registry — e.g. Pi < 0.80.3 catalogs without Claude Sonnet 5.
1264
+ * from the model registry — e.g. Pi catalogs that predate GLM 5.3 Flash.
1265
1265
  */
1266
1266
  export const DEFAULT_MODEL_FALLBACKS: ReadonlyArray<{ provider: string; modelId: string }> = [
1267
+ { provider: "anthropic", modelId: "claude-sonnet-5" },
1267
1268
  { provider: "anthropic", modelId: "claude-sonnet-4-5" },
1268
1269
  ];
1269
1270
 
@@ -1274,6 +1275,7 @@ export const DEFAULT_MODEL_FALLBACKS: ReadonlyArray<{ provider: string; modelId:
1274
1275
  * model" and may track the current package default.
1275
1276
  */
1276
1277
  export const LEGACY_DEFAULT_MODELS: ReadonlyArray<{ provider: string; modelId: string }> = [
1278
+ { provider: "anthropic", modelId: "claude-sonnet-5" },
1277
1279
  { provider: "anthropic", modelId: "claude-sonnet-4-5" },
1278
1280
  ];
1279
1281
 
@@ -2653,7 +2653,7 @@ export default function (pi: ExtensionAPI) {
2653
2653
  const parsed = parseModelString(value);
2654
2654
  if (!parsed) {
2655
2655
  ctx.ui.notify(
2656
- "Usage: /multimodal-proxy model provider/model-id\nExample: /multimodal-proxy model anthropic/claude-sonnet-5",
2656
+ "Usage: /multimodal-proxy model provider/model-id\nExample: /multimodal-proxy model zai/glm-5.3-flash",
2657
2657
  "warning",
2658
2658
  );
2659
2659
  return;
@@ -3787,7 +3787,7 @@ Use "*" or "all" to grant consent for all providers globally.`,
3787
3787
  ctx.ui.notify("[multimodal-proxy] Env override active for fallback-model.", "warning");
3788
3788
  return;
3789
3789
  }
3790
- const val = await ctx.ui.input("
3790
+ const val = await ctx.ui.input(
3791
3791
  "Fallback vision model (provider/model-id, or empty to clear)",
3792
3792
  effective.fallbackProvider ? `${effective.fallbackProvider}/${effective.fallbackModelId}` : "",
3793
3793
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-multimodal-proxy",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "description": "Automatic image, video and audio description for any model in Pi. Routes media to a multimodal model and injects descriptions into context.",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -14,6 +14,7 @@
14
14
  "type": "module",
15
15
  "scripts": {
16
16
  "test": "node --experimental-strip-types --no-warnings --test extensions/__tests__/*.test.ts",
17
+ "check": "node tools/check-syntax.mjs",
17
18
  "prepublishOnly": "node -e \"if(!process.env.CI)throw new Error('publish via release.yml CI: push a v* tag. Manual npm publish is blocked.')\""
18
19
  },
19
20
  "pi": {
@@ -41,5 +42,8 @@
41
42
  "README.md",
42
43
  "CHANGELOG.md",
43
44
  "SECURITY-REVIEW.md"
44
- ]
45
+ ],
46
+ "devDependencies": {
47
+ "typescript": "5.9"
48
+ }
45
49
  }