pi-zro-provider 1.3.18 → 1.3.20

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 ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## 1.3.20
4
+
5
+ - Validate against Pi 0.99.0, including an offline real-host package-loading probe.
6
+ - Declare imported host packages as wildcard peers and pin development dependencies to Pi 0.99.0.
package/README.md CHANGED
@@ -15,7 +15,7 @@ _GLM-5.2, Kimi K3, and DeepSeek V4 / V4.1 Flash — run through the Zro inferenc
15
15
 
16
16
  ## Features
17
17
 
18
- - **9+ AI Models** — GLM-5.2 (default), Kimi K3, DeepSeek V4 Flash, and DeepSeek V4.1 Flash, straight from Zro's production catalog
18
+ - **8+ AI Models** — GLM-5.2 (default), Kimi K3, DeepSeek V4 Flash, and DeepSeek V4.1 Flash, straight from Zro's production catalog
19
19
  - **Native reasoning effort** — every model ships an endpoint-verified `piLevel` → level-id map (`glm-5.2`, `glm-5.3-flash`, `deepseek-v4-flash-0731`: full `off`–`max` ladder; `deepseek-v4.1-flash`: `low`/`high`/`max` — catalog has no `none`, and `xhigh`/`max` both send `max`; `kimi-k3`: `low`/`high`/`max` — the proxy rejects `medium` there), so `/thinking low` etc. maps exactly to what the Zro proxy accepts. Quirks: `glm-5.3-flash` silently disables thinking at `low`, so `minimal`/`low` map to `minimal`; `glm-5.3` mirrors flash's full ladder — Z.ai officially removed `none` for the 5.3 family, but the proxy accepts it and streams cleanly (occasionally a short chain-of-thought preamble surfaces in `content` before the answer), and `xhigh`/`max` both send `max`
20
20
  - **OpenAI-compatible API** at `https://zro.moonmath.ai/v1`
21
21
  - **Official catalog sync** from Zro's `/api/cli/models` endpoint — same one `zro models` uses
@@ -31,7 +31,6 @@ _GLM-5.2, Kimi K3, and DeepSeek V4 / V4.1 Flash — run through the Zro inferenc
31
31
  | DeepSeek V4.1 Flash | Text + Image | 1.0M | 384K | $0.14 | $0.28 |
32
32
  | Dolly 1 | Text | 1.0M | 64K | — | — |
33
33
  | Dolly 1 Security | Text | 1.0M | 64K | — | — |
34
- | GLM-5.2 | Text | 524K | 64K | $1.10 | $4.00 |
35
34
  | GLM-5.3 | Text | 1.0M | 131K | $1.40 | $4.40 |
36
35
  | GLM-5.3 Flash | Text + Image | 1.0M | 64K | $0.15 | $0.50 |
37
36
  | Kimi K3 | Text + Image | 1.0M | 131K | $2.50 | $12.00 |
@@ -1,35 +1,4 @@
1
1
  {
2
- "glm-5.2": {
3
- "id": "glm-5.2",
4
- "name": "GLM-5.2",
5
- "reasoning": true,
6
- "thinkingLevelMap": {
7
- "off": "none",
8
- "minimal": null,
9
- "low": null,
10
- "medium": null,
11
- "high": "high",
12
- "xhigh": null,
13
- "max": "max"
14
- },
15
- "input": [
16
- "text"
17
- ],
18
- "cost": {
19
- "input": 0,
20
- "output": 0,
21
- "cacheRead": 0,
22
- "cacheWrite": 0
23
- },
24
- "contextWindow": 524288,
25
- "maxTokens": 64000,
26
- "compat": {
27
- "supportsDeveloperRole": false,
28
- "supportsReasoningEffort": true,
29
- "maxTokensField": "max_tokens"
30
- },
31
- "deprecatedAt": "2026-09-12T02:00:31.341Z"
32
- },
33
2
  "dolly1": {
34
3
  "id": "dolly1",
35
4
  "name": "Dolly 1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-zro-provider",
3
- "version": "1.3.18",
3
+ "version": "1.3.20",
4
4
  "description": "Zro provider extension for pi - GLM-5.2, GLM-5.3 Flash, Kimi K3, DeepSeek V4 Flash & DeepSeek V4.1 Flash through the Zro inference endpoint",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -9,7 +9,8 @@
9
9
  "build": "echo 'nothing to build'",
10
10
  "check": "tsc --noEmit && node tests/status.smoke.ts",
11
11
  "smoke": "node tests/status.smoke.ts",
12
- "update-models": "node scripts/update-models.js"
12
+ "update-models": "node scripts/update-models.js",
13
+ "test:pi": "node scripts/test-pi-compat.mjs"
13
14
  },
14
15
  "keywords": [
15
16
  "pi",
@@ -33,9 +34,13 @@
33
34
  ]
34
35
  },
35
36
  "devDependencies": {
36
- "@earendil-works/pi-ai": "0.87.0",
37
- "@earendil-works/pi-coding-agent": "0.87.0",
37
+ "@earendil-works/pi-ai": "0.99.0",
38
+ "@earendil-works/pi-coding-agent": "0.99.0",
38
39
  "@types/node": "^24.10.1",
39
40
  "typescript": "6.0.3"
41
+ },
42
+ "peerDependencies": {
43
+ "@earendil-works/pi-ai": "*",
44
+ "@earendil-works/pi-coding-agent": "*"
40
45
  }
41
46
  }
@@ -0,0 +1,50 @@
1
+ import assert from 'node:assert/strict';
2
+ import { mkdtemp, readFile, rm } from 'node:fs/promises';
3
+ import { tmpdir } from 'node:os';
4
+ import { dirname, join, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
8
+ const home = await mkdtemp(join(tmpdir(), 'pi-extension-compat-'));
9
+ const previousHome = process.env.PI_CODING_AGENT_DIR;
10
+ const previousFetch = globalThis.fetch;
11
+ process.env.PI_CODING_AGENT_DIR = home;
12
+ globalThis.fetch = async () => new Response('', { status: 503 });
13
+ let session;
14
+ try {
15
+ const { createAgentSession, DefaultResourceLoader, ModelRuntime, SessionManager, SettingsManager, VERSION } = await import('@earendil-works/pi-coding-agent');
16
+ assert.equal(VERSION, '0.99.0', 'test the actual pinned Pi host, not a stale override');
17
+ const manifest = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'));
18
+ for (const name of ['@earendil-works/pi-ai', '@earendil-works/pi-agent-core', '@earendil-works/pi-coding-agent', '@earendil-works/pi-tui', 'typebox']) {
19
+ assert.equal(manifest.dependencies?.[name], undefined, `${name}: host packages must not be runtime dependencies`);
20
+ if (manifest.peerDependencies?.[name] !== undefined) assert.equal(manifest.peerDependencies[name], '*');
21
+ }
22
+ const settingsManager = SettingsManager.inMemory({ packages: [root], compaction: { enabled: false }, retry: { enabled: false } });
23
+ const resourceLoader = new DefaultResourceLoader({ cwd: home, agentDir: home, settingsManager,
24
+ noSkills: true, noPromptTemplates: true, noThemes: true, noContextFiles: true });
25
+ await resourceLoader.reload();
26
+ const loaded = resourceLoader.getExtensions();
27
+ assert.deepEqual(loaded.errors, []);
28
+ assert.deepEqual(loaded.warnings ?? [], []);
29
+ assert.ok(loaded.extensions.length > 0, 'manifest entrypoints must load');
30
+ const modelRuntime = await ModelRuntime.create({ authPath: join(home, 'auth.json'), modelsPath: null, modelsStorePath: join(home, 'models-cache'), allowModelNetwork: false });
31
+ ({ session } = await createAgentSession({ cwd: home, agentDir: home, resourceLoader, modelRuntime, settingsManager, sessionManager: SessionManager.inMemory(home) }));
32
+ const names = new Set();
33
+ for (const extension of loaded.extensions) {
34
+ for (const [name, { definition }] of extension.tools) {
35
+ assert.equal(definition.name, name);
36
+ assert.equal(typeof definition.execute, 'function');
37
+ assert.equal(typeof definition.parameters, 'object');
38
+ assert.ok(!names.has(name), `duplicate tool ${name}`);
39
+ names.add(name);
40
+ assert.ok(session.getAllTools().some(tool => tool.name === name), `${name}: tool must be installed in the real session`);
41
+ }
42
+ }
43
+ console.log(`${manifest.name}: Pi ${VERSION} warning-free manifest load; ${loaded.extensions.length} extensions, ${names.size} tools registered`);
44
+ } finally {
45
+ session?.dispose();
46
+ globalThis.fetch = previousFetch;
47
+ if (previousHome === undefined) delete process.env.PI_CODING_AGENT_DIR;
48
+ else process.env.PI_CODING_AGENT_DIR = previousHome;
49
+ await rm(home, { recursive: true, force: true });
50
+ }