pi-zro-provider 1.3.25 → 1.3.27
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/.github/workflows/update-models.yml +60 -0
- package/CHANGELOG.md +4 -0
- package/deprecated-models.json +33 -1
- package/models.json +0 -30
- package/package.json +7 -3
- package/scripts/test-pi-compat.mjs +4 -4
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Update models
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "7 0 * * *" # 07:07 Asia/Ho_Chi_Minh
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
# Publishing uses npm Trusted Publishing (OIDC) bound to this workflow file, so
|
|
9
|
+
# no npm token is stored. A version pushed while publishing was unavailable is
|
|
10
|
+
# published by the next run that finds it missing from npm.
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: update-models
|
|
17
|
+
cancel-in-progress: false
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
update:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 15
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v5
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-node@v5
|
|
27
|
+
with:
|
|
28
|
+
node-version: 24
|
|
29
|
+
|
|
30
|
+
- name: Fetch the model catalog
|
|
31
|
+
env:
|
|
32
|
+
ZRO_API_KEY: ${{ secrets.ZRO_API_KEY }}
|
|
33
|
+
run: node scripts/update-models.js
|
|
34
|
+
|
|
35
|
+
- name: Commit, bump and push
|
|
36
|
+
run: |
|
|
37
|
+
if git diff --quiet; then
|
|
38
|
+
echo "No model changes."
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
git config user.name "github-actions[bot]"
|
|
42
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
43
|
+
git add -A
|
|
44
|
+
git commit -m "feat: update zro models from API"
|
|
45
|
+
npm version patch --no-git-tag-version
|
|
46
|
+
version=$(node -p "require('./package.json').version")
|
|
47
|
+
git commit -am "chore(release): v$version"
|
|
48
|
+
git push origin HEAD:main
|
|
49
|
+
|
|
50
|
+
- name: Publish to npm if this version is missing
|
|
51
|
+
run: |
|
|
52
|
+
name=$(node -p "require('./package.json').name")
|
|
53
|
+
version=$(node -p "require('./package.json').version")
|
|
54
|
+
if npm view "$name@$version" version >/dev/null 2>&1; then
|
|
55
|
+
echo "$name@$version is already on npm."
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
58
|
+
# Trusted publishing needs npm 11.5.1 or newer.
|
|
59
|
+
npm install --global npm@latest
|
|
60
|
+
npm publish --access public --provenance
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.27
|
|
4
|
+
|
|
5
|
+
- Pin Pi SDK development dependencies to 1.2.0 while retaining wildcard host peers; verify real manifest loading, lifecycle and native/bundled Pi hosts offline.
|
|
6
|
+
|
|
3
7
|
## 1.3.25
|
|
4
8
|
|
|
5
9
|
- Quiet startup sync: background `/api/cli/models` revalidation runs only with an API key, only when the disk cache is older than 1 hour (`PI_PROVIDER_SYNC_TTL_MS`, `0` = always), missing, or fetched with a different key (including a new `zro login`), and only in one pi process at a time (lock file next to the cache). Failed refreshes back off for 5 minutes; sessions that skip adopt a cache refreshed by another process.
|
package/deprecated-models.json
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"kimi-k3": {
|
|
3
|
+
"id": "kimi-k3",
|
|
4
|
+
"name": "Kimi K3",
|
|
5
|
+
"reasoning": true,
|
|
6
|
+
"thinkingLevelMap": {
|
|
7
|
+
"off": null,
|
|
8
|
+
"minimal": null,
|
|
9
|
+
"low": "low",
|
|
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": 1048576,
|
|
25
|
+
"maxTokens": 131072,
|
|
26
|
+
"compat": {
|
|
27
|
+
"supportsDeveloperRole": false,
|
|
28
|
+
"supportsReasoningEffort": true,
|
|
29
|
+
"maxTokensField": "max_tokens"
|
|
30
|
+
},
|
|
31
|
+
"deprecatedAt": "2026-10-15T04:24:09.470Z"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/models.json
CHANGED
|
@@ -143,35 +143,5 @@
|
|
|
143
143
|
"supportsReasoningEffort": true,
|
|
144
144
|
"maxTokensField": "max_tokens"
|
|
145
145
|
}
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"id": "kimi-k3",
|
|
149
|
-
"name": "Kimi K3",
|
|
150
|
-
"reasoning": true,
|
|
151
|
-
"thinkingLevelMap": {
|
|
152
|
-
"off": null,
|
|
153
|
-
"minimal": null,
|
|
154
|
-
"low": "low",
|
|
155
|
-
"medium": null,
|
|
156
|
-
"high": "high",
|
|
157
|
-
"xhigh": null,
|
|
158
|
-
"max": "max"
|
|
159
|
-
},
|
|
160
|
-
"input": [
|
|
161
|
-
"text"
|
|
162
|
-
],
|
|
163
|
-
"cost": {
|
|
164
|
-
"input": 0,
|
|
165
|
-
"output": 0,
|
|
166
|
-
"cacheRead": 0,
|
|
167
|
-
"cacheWrite": 0
|
|
168
|
-
},
|
|
169
|
-
"contextWindow": 1048576,
|
|
170
|
-
"maxTokens": 131072,
|
|
171
|
-
"compat": {
|
|
172
|
-
"supportsDeveloperRole": false,
|
|
173
|
-
"supportsReasoningEffort": true,
|
|
174
|
-
"maxTokensField": "max_tokens"
|
|
175
|
-
}
|
|
176
146
|
}
|
|
177
147
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-zro-provider",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.27",
|
|
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",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"brace-expansion": "5.0.12"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@earendil-works/pi-ai": "1.
|
|
42
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
41
|
+
"@earendil-works/pi-ai": "1.2.0",
|
|
42
|
+
"@earendil-works/pi-coding-agent": "1.2.0",
|
|
43
43
|
"@types/node": "^24.10.1",
|
|
44
44
|
"typescript": "6.0.3",
|
|
45
45
|
"vitest": "4.1.7"
|
|
@@ -47,5 +47,9 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@earendil-works/pi-ai": "*",
|
|
49
49
|
"@earendil-works/pi-coding-agent": "*"
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/monotykamary/pi-zro-provider.git"
|
|
50
54
|
}
|
|
51
55
|
}
|
|
@@ -13,7 +13,7 @@ globalThis.fetch = async () => new Response('', { status: 503 });
|
|
|
13
13
|
let session;
|
|
14
14
|
try {
|
|
15
15
|
const { createAgentSession, DefaultResourceLoader, ModelRuntime, SessionManager, SettingsManager, VERSION } = await import('@earendil-works/pi-coding-agent');
|
|
16
|
-
assert.equal(VERSION, '1.
|
|
16
|
+
assert.equal(VERSION, '1.2.0', 'test the actual pinned Pi host, not a stale override');
|
|
17
17
|
const manifest = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'));
|
|
18
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
19
|
assert.equal(manifest.dependencies?.[name], undefined, `${name}: host packages must not be runtime dependencies`);
|
|
@@ -58,7 +58,7 @@ try {
|
|
|
58
58
|
{ id: label, choices: [{ index: 0, delta: {}, finish_reason: 'stop' }], usage: { prompt_tokens: 3, completion_tokens: 2, total_tokens: 5, total_cost: 0.001 } },
|
|
59
59
|
];
|
|
60
60
|
const result = await modelRuntime.streamSimple(model, { messages: [
|
|
61
|
-
{ role: 'system', content: 'Offline Pi 1.
|
|
61
|
+
{ role: 'system', content: 'Offline Pi 1.2.0 transcript', timestamp: 0 },
|
|
62
62
|
{ role: 'user', content: label, timestamp: 1 },
|
|
63
63
|
] }, {
|
|
64
64
|
maxTokens: 32,
|
|
@@ -77,13 +77,13 @@ try {
|
|
|
77
77
|
assert.equal(result.usage.totalTokens, 5);
|
|
78
78
|
assert.equal(requestBody.user, label, 'request-scoped instrumentation must not cross concurrent streams');
|
|
79
79
|
assert.equal(requestBody.max_tokens ?? requestBody.max_completion_tokens, 32);
|
|
80
|
-
assert.ok(requestBody.messages.some(message => typeof message.content === 'string' && message.content.includes('Offline Pi 1.
|
|
80
|
+
assert.ok(requestBody.messages.some(message => typeof message.content === 'string' && message.content.includes('Offline Pi 1.2.0 transcript')));
|
|
81
81
|
assert.deepEqual(hooks.slice(0, 2), ['payload', 'response']);
|
|
82
82
|
assert.equal(hooks.filter(hook => hook === 'stream').length, 2);
|
|
83
83
|
}));
|
|
84
84
|
assert.equal(globalThis.fetch, offlineFetch, 'Zro must never monkey-patch global fetch');
|
|
85
85
|
await session.extensionRunner.emit({ type: 'session_shutdown' });
|
|
86
|
-
assert.deepEqual(errors, [], 'Pi 1.
|
|
86
|
+
assert.deepEqual(errors, [], 'Pi 1.2.0 startup and shutdown must be clean');
|
|
87
87
|
console.log(`${manifest.name}: Pi ${VERSION} manifest, ${models.length} models, startup/shutdown, concurrent streams and instrumentation OK`);
|
|
88
88
|
} finally {
|
|
89
89
|
session?.dispose();
|