pi-zro-provider 1.1.0 → 1.2.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.
@@ -1,67 +1,67 @@
1
1
  {
2
2
  "format": 1,
3
3
  "entries": {
4
- "topology/hosts/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d": {
5
- "key": "topology/hosts/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d",
4
+ "topology/hosts/d8923395981d75b371b541819ff73bd3f404bd6e87352a788822d5eee43822c6": {
5
+ "key": "topology/hosts/d8923395981d75b371b541819ff73bd3f404bd6e87352a788822d5eee43822c6",
6
6
  "value": {
7
7
  "format": 1,
8
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
9
- "rootId": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
8
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
9
+ "rootId": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
10
10
  "identity": {
11
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
11
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
12
12
  "name": "main",
13
13
  "kind": "main",
14
- "sessionId": "01a01e04-c04a-79f6-8622-d51fd5ec5579"
14
+ "sessionId": "01a01f64-506e-7ce7-b2ff-ab10d7f56675"
15
15
  },
16
- "startedAt": 1787211819838,
17
- "updatedAt": 1787212059978,
18
- "expiresAt": 1787212074978
16
+ "startedAt": 1787233075855,
17
+ "updatedAt": 1787233210958,
18
+ "expiresAt": 1787233225958
19
19
  },
20
- "version": 406,
21
- "updatedAt": 1787212059978,
20
+ "version": 111,
21
+ "updatedAt": 1787233210959,
22
22
  "updatedBy": {
23
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
23
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
24
24
  "name": "main",
25
25
  "kind": "main",
26
- "sessionId": "01a01e04-c04a-79f6-8622-d51fd5ec5579"
26
+ "sessionId": "01a01f64-506e-7ce7-b2ff-ab10d7f56675"
27
27
  }
28
28
  },
29
- "sessions/01a01e04-c04a-79f6-8622-d51fd5ec5579": {
30
- "key": "sessions/01a01e04-c04a-79f6-8622-d51fd5ec5579",
29
+ "sessions/01a01f64-506e-7ce7-b2ff-ab10d7f56675": {
30
+ "key": "sessions/01a01f64-506e-7ce7-b2ff-ab10d7f56675",
31
31
  "value": {
32
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
33
- "name": "Peer 01a01e04",
32
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
33
+ "name": "Peer 01a01f64",
34
34
  "kind": "peer",
35
35
  "status": "running",
36
36
  "runner": "pi",
37
37
  "transport": "host",
38
38
  "cwd": "/Users/monotykamary/VCS/working-remote/open-source/pi-zro-provider",
39
- "sessionId": "01a01e04-c04a-79f6-8622-d51fd5ec5579",
40
- "model": "neuralwatt/deepseek-v4-flash",
39
+ "sessionId": "01a01f64-506e-7ce7-b2ff-ab10d7f56675",
40
+ "model": "zro/deepseek-v4-flash-0731",
41
41
  "thinking": "max",
42
- "startedAt": 1787211819838,
43
- "updatedAt": 1787212059978,
42
+ "startedAt": 1787233075855,
43
+ "updatedAt": 1787233210958,
44
44
  "pendingMessages": false,
45
45
  "local": false
46
46
  },
47
- "version": 405,
48
- "updatedAt": 1787212059979,
47
+ "version": 111,
48
+ "updatedAt": 1787233210961,
49
49
  "updatedBy": {
50
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
50
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
51
51
  "name": "main",
52
52
  "kind": "main",
53
- "sessionId": "01a01e04-c04a-79f6-8622-d51fd5ec5579"
53
+ "sessionId": "01a01f64-506e-7ce7-b2ff-ab10d7f56675"
54
54
  }
55
55
  },
56
- "topology/participants/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d": {
57
- "key": "topology/participants/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d",
56
+ "topology/participants/d8923395981d75b371b541819ff73bd3f404bd6e87352a788822d5eee43822c6": {
57
+ "key": "topology/participants/d8923395981d75b371b541819ff73bd3f404bd6e87352a788822d5eee43822c6",
58
58
  "value": {
59
59
  "format": 1,
60
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
60
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
61
61
  "kind": "root",
62
- "rootId": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
63
- "ownerHostId": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
64
- "ownerIdentityId": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
62
+ "rootId": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
63
+ "ownerHostId": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
64
+ "ownerIdentityId": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
65
65
  "name": "main",
66
66
  "status": "running",
67
67
  "runner": "pi",
@@ -72,28 +72,53 @@
72
72
  "fabric"
73
73
  ],
74
74
  "cwd": "/Users/monotykamary/VCS/working-remote/open-source/pi-zro-provider",
75
- "sessionId": "01a01e04-c04a-79f6-8622-d51fd5ec5579",
76
- "model": "neuralwatt/deepseek-v4-flash",
75
+ "sessionId": "01a01f64-506e-7ce7-b2ff-ab10d7f56675",
76
+ "model": "zro/deepseek-v4-flash-0731",
77
77
  "thinking": "max",
78
- "startedAt": 1787211819838,
79
- "updatedAt": 1787212059978,
78
+ "startedAt": 1787233075855,
79
+ "updatedAt": 1787233210958,
80
80
  "pendingMessages": false,
81
81
  "controlProtocol": "v1"
82
82
  },
83
- "version": 406,
84
- "updatedAt": 1787212059980,
83
+ "version": 111,
84
+ "updatedAt": 1787233210962,
85
85
  "updatedBy": {
86
- "id": "session:01a01e04-c04a-79f6-8622-d51fd5ec5579",
86
+ "id": "session:01a01f64-506e-7ce7-b2ff-ab10d7f56675",
87
87
  "name": "main",
88
88
  "kind": "main",
89
- "sessionId": "01a01e04-c04a-79f6-8622-d51fd5ec5579"
89
+ "sessionId": "01a01f64-506e-7ce7-b2ff-ab10d7f56675"
90
90
  }
91
91
  }
92
92
  },
93
93
  "versions": {
94
- "topology/hosts/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d": 406,
95
- "sessions/01a01e04-c04a-79f6-8622-d51fd5ec5579": 405,
96
- "topology/participants/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d": 406
94
+ "topology/hosts/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d": 432,
95
+ "sessions/01a01e04-c04a-79f6-8622-d51fd5ec5579": 430,
96
+ "topology/participants/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d": 432,
97
+ "topology/hosts/f897952f163e466202552b37e65ae2cdab8cf17c1a6207bc7c209e76fde4e4bf": 19,
98
+ "sessions/01a01e25-6ee3-7b4a-9869-7f7e19b26b33": 17,
99
+ "topology/participants/f897952f163e466202552b37e65ae2cdab8cf17c1a6207bc7c209e76fde4e4bf": 19,
100
+ "topology/hosts/5ec9312abebdf934b4117e4d2acc0a77e1cf0a34b2f851a9f45619ea5c5b4ca9": 466,
101
+ "sessions/01a01e5d-2008-7d53-850a-5d4385b1f4a5": 465,
102
+ "topology/participants/5ec9312abebdf934b4117e4d2acc0a77e1cf0a34b2f851a9f45619ea5c5b4ca9": 466,
103
+ "topology/hosts/77fdce9b48f74a11203333d3a1f534de0856d3540852f48866cb2892c4c03d1d": 83,
104
+ "sessions/01a01e62-581e-7c48-b910-e95dff1f1e3e": 82,
105
+ "topology/participants/77fdce9b48f74a11203333d3a1f534de0856d3540852f48866cb2892c4c03d1d": 83,
106
+ "topology/hosts/d8923395981d75b371b541819ff73bd3f404bd6e87352a788822d5eee43822c6": 111,
107
+ "sessions/01a01f64-506e-7ce7-b2ff-ab10d7f56675": 111,
108
+ "topology/participants/d8923395981d75b371b541819ff73bd3f404bd6e87352a788822d5eee43822c6": 111
97
109
  },
98
- "tombstoneOrder": []
110
+ "tombstoneOrder": [
111
+ "sessions/01a01e04-c04a-79f6-8622-d51fd5ec5579",
112
+ "topology/participants/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d",
113
+ "topology/hosts/786a8331932386356c41bd1d599a449d4cddcc84adf186b48d09c3cddbef167d",
114
+ "sessions/01a01e25-6ee3-7b4a-9869-7f7e19b26b33",
115
+ "topology/participants/f897952f163e466202552b37e65ae2cdab8cf17c1a6207bc7c209e76fde4e4bf",
116
+ "topology/hosts/f897952f163e466202552b37e65ae2cdab8cf17c1a6207bc7c209e76fde4e4bf",
117
+ "sessions/01a01e62-581e-7c48-b910-e95dff1f1e3e",
118
+ "topology/participants/77fdce9b48f74a11203333d3a1f534de0856d3540852f48866cb2892c4c03d1d",
119
+ "topology/hosts/77fdce9b48f74a11203333d3a1f534de0856d3540852f48866cb2892c4c03d1d",
120
+ "sessions/01a01e5d-2008-7d53-850a-5d4385b1f4a5",
121
+ "topology/participants/5ec9312abebdf934b4117e4d2acc0a77e1cf0a34b2f851a9f45619ea5c5b4ca9",
122
+ "topology/hosts/5ec9312abebdf934b4117e4d2acc0a77e1cf0a34b2f851a9f45619ea5c5b4ca9"
123
+ ]
99
124
  }
package/README.md CHANGED
@@ -101,8 +101,8 @@ The available levels are model-specific and come straight from Zro's catalog:
101
101
 
102
102
  | Model | pi levels | Sent as `reasoning_effort` |
103
103
  |-------|-----------|----------------------------|
104
- | `glm-5.2` | `off`, `high`, `xhigh` | `none`, `high`, `max` |
105
- | `kimi-k3` | `low`, `high`, `xhigh` | `low`, `high`, `max` |
104
+ | `glm-5.2` | `off`, `high`, `max` | `none`, `high`, `max` |
105
+ | `kimi-k3` | `low`, `high`, `max` | `low`, `high`, `max` |
106
106
  | `deepseek-v4-flash-0731` | `off`, `low`, `high`, `max` | `none`, `low`, `high`, `max` |
107
107
 
108
108
  Levels map one-to-one through `thinkingLevelMap`, so `off` sends Zro's `none` token instead of silently dropping the field.
package/index.ts CHANGED
@@ -612,6 +612,9 @@ function streamZro(
612
612
  const reasoningEffort = clampedReasoning === "off" ? undefined : clampedReasoning;
613
613
  const { reasoning: _reasoning, ...streamOptions } = (options ?? {}) as any;
614
614
 
615
+ // Zro stages some models (kimi-k3) at "no max_tokens => completion budget = full context" and 400s on any real prompt, so always send the model's curated cap unless the caller supplied one.
616
+ const maxTokens = (options as any)?.maxTokens ?? zroModel.maxTokens;
617
+
615
618
  // Per-request fetch wrapper: owns its interceptor, safe under concurrency.
616
619
  const upstreamFetch = (streamOptions as any).fetch ?? globalThis.fetch;
617
620
  const metaFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
@@ -639,6 +642,7 @@ function streamZro(
639
642
  fetch: metaFetch,
640
643
  reasoningEffort,
641
644
  apiKey,
645
+ maxTokens,
642
646
  } as any);
643
647
  }
644
648
 
package/models.json CHANGED
@@ -34,13 +34,14 @@
34
34
  "name": "GLM-5.2",
35
35
  "reasoning": true,
36
36
  "thinkingLevelMap": {
37
- "off": "none",
38
- "minimal": null,
39
- "low": null,
40
- "medium": null,
41
- "high": "high",
42
- "xhigh": "max"
43
- },
37
+ "off": "none",
38
+ "minimal": null,
39
+ "low": null,
40
+ "medium": null,
41
+ "high": "high",
42
+ "xhigh": null,
43
+ "max": "max"
44
+ },
44
45
  "input": [
45
46
  "text"
46
47
  ],
@@ -63,13 +64,14 @@
63
64
  "name": "Kimi K3",
64
65
  "reasoning": true,
65
66
  "thinkingLevelMap": {
66
- "off": null,
67
- "minimal": null,
68
- "low": "low",
69
- "medium": null,
70
- "high": "high",
71
- "xhigh": "max"
72
- },
67
+ "off": null,
68
+ "minimal": null,
69
+ "low": "low",
70
+ "medium": null,
71
+ "high": "high",
72
+ "xhigh": null,
73
+ "max": "max"
74
+ },
73
75
  "input": [
74
76
  "text"
75
77
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-zro-provider",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Zro provider extension for pi - GLM-5.2, Kimi K3 & DeepSeek V4 Flash through the Zro inference endpoint",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/patch.json CHANGED
@@ -8,9 +8,44 @@
8
8
  "high": "high",
9
9
  "xhigh": null,
10
10
  "max": "max"
11
+ },
12
+ "cost": {
13
+ "input": 0.14,
14
+ "output": 0.28,
15
+ "cacheRead": 0.0028
11
16
  }
12
17
  },
13
18
  "kimi-k3": {
14
- "maxTokens": 131072
19
+ "maxTokens": 131072,
20
+ "thinkingLevelMap": {
21
+ "off": null,
22
+ "minimal": null,
23
+ "low": "low",
24
+ "medium": null,
25
+ "high": "high",
26
+ "xhigh": null,
27
+ "max": "max"
28
+ },
29
+ "cost": {
30
+ "input": 2.5,
31
+ "output": 12,
32
+ "cacheRead": 0.45
33
+ }
34
+ },
35
+ "glm-5.2": {
36
+ "thinkingLevelMap": {
37
+ "off": "none",
38
+ "minimal": null,
39
+ "low": null,
40
+ "medium": null,
41
+ "high": "high",
42
+ "xhigh": null,
43
+ "max": "max"
44
+ },
45
+ "cost": {
46
+ "input": 1.1,
47
+ "output": 4,
48
+ "cacheRead": 0.2
49
+ }
15
50
  }
16
51
  }