pi-makora-provider 1.12.2 → 1.12.3
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 +0 -5
- package/deprecated-models.json +1 -0
- package/index.ts +31 -1
- package/models.json +0 -105
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -23,12 +23,7 @@ _DeepSeek V4, Kimi K2.7 Code, GLM 5.2, Qwen 3.6 for [pi](https://github.com/eare
|
|
|
23
23
|
| Gemma 4 26B A4B | `google/gemma-4-26B-A4B` | No | |
|
|
24
24
|
| GLM 5.2 FP8 | `zai-org/GLM-5.2-FP8` | Yes | off via top-level `reasoning_effort: "none"` (only lever GLM responds to; `enable_thinking`/`thinking`/chat_template_kwargs toggles are ignored); effort `high`/`max` only (minimal/low/medium clamp to `high`); multi-turn continuity via `clear_thinking` (false when thinking on = preserve, true when off = clear; `preserve_thinking` is inert for GLM) injected via onPayload; returns `reasoning` field |
|
|
25
25
|
| GLM 5.2 NVFP4 | `zai-org/GLM-5.2-NVFP4` | Yes | off via top-level `reasoning_effort: "none"` (only lever GLM responds to; `enable_thinking`/`thinking`/chat_template_kwargs toggles are ignored); effort `high`/`max` only (minimal/low/medium clamp to `high`); multi-turn continuity via `clear_thinking` (false when thinking on = preserve, true when off = clear; `preserve_thinking` is inert for GLM) injected via onPayload; returns `reasoning` field |
|
|
26
|
-
| GPT-OSS 120B | `openai/gpt-oss-120b` | No | |
|
|
27
|
-
| Kimi K2.7 Code | `moonshotai/Kimi-K2.7-Code` | Yes | on/off via namespaced `chat_template_kwargs.thinking` (toggled with thinking switch); `preserve_thinking` (toggled) for multi-turn continuity; onPayload aliases each assistant message's `reasoning` → `reasoning_content` (Kimi's template reads `reasoning_content` but pi-ai sends `reasoning`); returns `reasoning` field. `reasoning_effort` is not emitted (Kimi's template reads namespaced `thinking`, not `reasoning_effort`) |
|
|
28
26
|
| Llama 3.3 70B FP8 | `amd/Llama-3.3-70B-Instruct-FP8-KV` | No | |
|
|
29
|
-
| Llama 3.3 70B Instruct | `meta-llama/Llama-3.3-70B-Instruct` | No | |
|
|
30
|
-
| Qwen 3.6 27B NVFP4 | `unsloth/Qwen3.6-27B-NVFP4` | Yes | off via top-level `reasoning_effort: "none"`; `preserve_thinking` (toggled with thinking switch) injected via onPayload for multi-turn continuity; returns `reasoning` field |
|
|
31
|
-
| Qwen 3.6 35B A3B NVFP4 | `unsloth/Qwen3.6-35B-A3B-NVFP4` | Yes | off via top-level `reasoning_effort: "none"`; `preserve_thinking` (toggled with thinking switch) injected via onPayload for multi-turn continuity; returns `reasoning` field |
|
|
32
27
|
<!-- MODELS_TABLE_END -->
|
|
33
28
|
|
|
34
29
|
## Installation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/index.ts
CHANGED
|
@@ -52,6 +52,7 @@ import { clampThinkingLevel, streamOpenAICompletions } from "@earendil-works/pi-
|
|
|
52
52
|
import modelsData from "./models.json" with { type: "json" };
|
|
53
53
|
import customModelsData from "./custom-models.json" with { type: "json" };
|
|
54
54
|
import patchData from "./patch.json" with { type: "json" };
|
|
55
|
+
import deprecatedData from "./deprecated-models.json" with { type: "json" };
|
|
55
56
|
import { registerNanCollapseGuard, nanCanary, canaryEnabled, isGuardedModel } from "./nan-collapse-guard.js";
|
|
56
57
|
import fs from "fs";
|
|
57
58
|
import path from "path";
|
|
@@ -549,6 +550,35 @@ export function streamMakora(
|
|
|
549
550
|
});
|
|
550
551
|
}
|
|
551
552
|
|
|
553
|
+
// Grace period for delisted models. When the provider API stops listing a
|
|
554
|
+
// model, update-models.js moves its last-known definition into
|
|
555
|
+
// deprecated-models.json (stamped with deprecatedAt) instead of dropping it.
|
|
556
|
+
// For 14 days the model keeps working here so in-flight sessions and saved
|
|
557
|
+
// model settings do not break; afterwards it is evicted permanently.
|
|
558
|
+
const DEPRECATED_MODEL_TTL_MS = 14 * 24 * 60 * 60 * 1000;
|
|
559
|
+
|
|
560
|
+
// Grace-period deprecated models with deprecation metadata stripped.
|
|
561
|
+
function activeDeprecatedModels(): JsonModel[] {
|
|
562
|
+
const now = Date.now();
|
|
563
|
+
const result: JsonModel[] = [];
|
|
564
|
+
for (const entry of Object.values(deprecatedData as Record<string, JsonModel & { deprecatedAt?: string }>)) {
|
|
565
|
+
if (!entry?.id) continue;
|
|
566
|
+
const removedAt = Date.parse(entry.deprecatedAt ?? "");
|
|
567
|
+
if (Number.isNaN(removedAt) || now - removedAt > DEPRECATED_MODEL_TTL_MS) continue;
|
|
568
|
+
const model = { ...entry } as JsonModel & { deprecatedAt?: string };
|
|
569
|
+
delete model.deprecatedAt;
|
|
570
|
+
result.push(model);
|
|
571
|
+
}
|
|
572
|
+
return result;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Append grace-period deprecated models the list does not already have (live data wins).
|
|
576
|
+
function withDeprecated(models: JsonModel[]): JsonModel[] {
|
|
577
|
+
const seen = new Set(models.map((m) => m.id));
|
|
578
|
+
const extras = activeDeprecatedModels().filter((m) => !seen.has(m.id));
|
|
579
|
+
return extras.length > 0 ? [...models, ...extras] : models;
|
|
580
|
+
}
|
|
581
|
+
|
|
552
582
|
// Extension Entry Point
|
|
553
583
|
|
|
554
584
|
const PROVIDER_ID = "makora";
|
|
@@ -564,7 +594,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
564
594
|
}
|
|
565
595
|
|
|
566
596
|
function builtModels(): JsonModel[] {
|
|
567
|
-
return buildModels(embeddedModels, customModels, patches, activeOverrides());
|
|
597
|
+
return withDeprecated(buildModels(embeddedModels, customModels, patches, activeOverrides()));
|
|
568
598
|
}
|
|
569
599
|
|
|
570
600
|
// apiKey resolution order: auth.json ("makora" key) → MAKORA_OPTIMIZE_TOKEN env var.
|
package/models.json
CHANGED
|
@@ -62,111 +62,6 @@
|
|
|
62
62
|
"maxTokensField": "max_completion_tokens"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
{
|
|
66
|
-
"id": "meta-llama/Llama-3.3-70B-Instruct",
|
|
67
|
-
"name": "Llama 3.3 70B Instruct",
|
|
68
|
-
"reasoning": false,
|
|
69
|
-
"input": [
|
|
70
|
-
"text"
|
|
71
|
-
],
|
|
72
|
-
"cost": {
|
|
73
|
-
"input": 0,
|
|
74
|
-
"output": 0,
|
|
75
|
-
"cacheRead": 0,
|
|
76
|
-
"cacheWrite": 0
|
|
77
|
-
},
|
|
78
|
-
"contextWindow": 4096,
|
|
79
|
-
"maxTokens": 0,
|
|
80
|
-
"compat": {
|
|
81
|
-
"supportsDeveloperRole": false,
|
|
82
|
-
"supportsStore": false,
|
|
83
|
-
"maxTokensField": "max_completion_tokens"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"id": "moonshotai/Kimi-K2.7-Code",
|
|
88
|
-
"name": "Kimi K2.7 Code",
|
|
89
|
-
"reasoning": false,
|
|
90
|
-
"input": [
|
|
91
|
-
"text"
|
|
92
|
-
],
|
|
93
|
-
"cost": {
|
|
94
|
-
"input": 0,
|
|
95
|
-
"output": 0,
|
|
96
|
-
"cacheRead": 0,
|
|
97
|
-
"cacheWrite": 0
|
|
98
|
-
},
|
|
99
|
-
"contextWindow": 262144,
|
|
100
|
-
"maxTokens": 0,
|
|
101
|
-
"compat": {
|
|
102
|
-
"supportsDeveloperRole": false,
|
|
103
|
-
"supportsStore": false,
|
|
104
|
-
"maxTokensField": "max_completion_tokens"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"id": "openai/gpt-oss-120b",
|
|
109
|
-
"name": "GPT-OSS 120B",
|
|
110
|
-
"reasoning": false,
|
|
111
|
-
"input": [
|
|
112
|
-
"text"
|
|
113
|
-
],
|
|
114
|
-
"cost": {
|
|
115
|
-
"input": 0,
|
|
116
|
-
"output": 0,
|
|
117
|
-
"cacheRead": 0,
|
|
118
|
-
"cacheWrite": 0
|
|
119
|
-
},
|
|
120
|
-
"contextWindow": 131072,
|
|
121
|
-
"maxTokens": 0,
|
|
122
|
-
"compat": {
|
|
123
|
-
"supportsDeveloperRole": false,
|
|
124
|
-
"supportsStore": false,
|
|
125
|
-
"maxTokensField": "max_completion_tokens"
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"id": "unsloth/Qwen3.6-27B-NVFP4",
|
|
130
|
-
"name": "Qwen 3.6 27B NVFP4",
|
|
131
|
-
"reasoning": false,
|
|
132
|
-
"input": [
|
|
133
|
-
"text"
|
|
134
|
-
],
|
|
135
|
-
"cost": {
|
|
136
|
-
"input": 0,
|
|
137
|
-
"output": 0,
|
|
138
|
-
"cacheRead": 0,
|
|
139
|
-
"cacheWrite": 0
|
|
140
|
-
},
|
|
141
|
-
"contextWindow": 262144,
|
|
142
|
-
"maxTokens": 0,
|
|
143
|
-
"compat": {
|
|
144
|
-
"supportsDeveloperRole": false,
|
|
145
|
-
"supportsStore": false,
|
|
146
|
-
"maxTokensField": "max_completion_tokens"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"id": "unsloth/Qwen3.6-35B-A3B-NVFP4",
|
|
151
|
-
"name": "Qwen 3.6 35B A3B NVFP4",
|
|
152
|
-
"reasoning": false,
|
|
153
|
-
"input": [
|
|
154
|
-
"text"
|
|
155
|
-
],
|
|
156
|
-
"cost": {
|
|
157
|
-
"input": 0,
|
|
158
|
-
"output": 0,
|
|
159
|
-
"cacheRead": 0,
|
|
160
|
-
"cacheWrite": 0
|
|
161
|
-
},
|
|
162
|
-
"contextWindow": 262144,
|
|
163
|
-
"maxTokens": 0,
|
|
164
|
-
"compat": {
|
|
165
|
-
"supportsDeveloperRole": false,
|
|
166
|
-
"supportsStore": false,
|
|
167
|
-
"maxTokensField": "max_completion_tokens"
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
65
|
{
|
|
171
66
|
"id": "zai-org/GLM-5.2-FP8",
|
|
172
67
|
"name": "GLM 5.2 FP8",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-makora-provider",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.3",
|
|
4
4
|
"description": "Makora provider extension for pi - Access DeepSeek V4, GLM 5.2, Kimi K2.7 Code, Llama 3.3, Qwen 3.6, and more through the Makora inference API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"index.ts",
|
|
24
24
|
"nan-collapse-guard.ts",
|
|
25
25
|
"models.json",
|
|
26
|
+
"deprecated-models.json",
|
|
26
27
|
"custom-models.json",
|
|
27
28
|
"patch.json",
|
|
28
29
|
"README.md",
|
|
@@ -34,8 +35,8 @@
|
|
|
34
35
|
]
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
38
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
38
|
+
"@earendil-works/pi-agent-core": "^0.83.0",
|
|
39
|
+
"@earendil-works/pi-coding-agent": "^0.83.0",
|
|
39
40
|
"vitest": "^4.1.9"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|