pi-freeflow 1.23.3 → 1.26.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 +31 -0
- package/README.md +381 -379
- package/package.json +1 -1
- package/src/catalog.ts +19 -13
- package/src/cline-accounts.ts +891 -634
- package/src/index.ts +1 -1
- package/src/models.ts +58 -30
- package/src/proxy.ts +1509 -1466
- package/src/upstream-health.ts +507 -492
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* pi-freeflow — Modular, high-resiliency LLM extension for Pi & Oh My Pi (OMP)
|
|
3
3
|
*
|
|
4
|
-
* Provides access to
|
|
4
|
+
* Provides access to 33 free models (9 OpenCode Zen + 19 KiloCode Gateway + 5 Cline) with:
|
|
5
5
|
* - Single-port daemon reuse on 28180 across concurrent subagents
|
|
6
6
|
* - Multi-cloud rolling egress relays (Vercel Edge, Cloudflare, Deno)
|
|
7
7
|
* - 0ms instant startup with verified static catalog and background live health checks
|
package/src/models.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Static model definitions and upstream routing catalogs for pi-freeflow
|
|
3
3
|
*
|
|
4
|
-
* Defines the
|
|
5
|
-
* -
|
|
4
|
+
* Defines the 33 verified free models:
|
|
5
|
+
* - 9 OpenCode Zen models (2 Responses API + 7 Chat Completions)
|
|
6
6
|
* - 19 KiloCode Keyless Gateway models (18 OpenRouter format + 1 Standard format)
|
|
7
|
+
* - 5 Cline direct-only models (per-user pool)
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
10
|
import type { ModelDef, ThinkingLevelMap, Upstream } from "./types.ts";
|
|
@@ -66,6 +67,23 @@ export const OPENCODE_MODELS: ModelDef[] = [
|
|
|
66
67
|
max: null,
|
|
67
68
|
},
|
|
68
69
|
},
|
|
70
|
+
{
|
|
71
|
+
id: "mimo-v2.6-flash-free",
|
|
72
|
+
name: "MiMo V2.6 Flash (1M) [OpenCode]",
|
|
73
|
+
reasoning: true,
|
|
74
|
+
contextWindow: 1_048_576,
|
|
75
|
+
maxTokens: 131_072,
|
|
76
|
+
input: ["text", "image"],
|
|
77
|
+
thinkingLevelMap: {
|
|
78
|
+
off: null,
|
|
79
|
+
minimal: "low",
|
|
80
|
+
low: "low",
|
|
81
|
+
medium: "medium",
|
|
82
|
+
high: "high",
|
|
83
|
+
xhigh: "high",
|
|
84
|
+
max: null,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
69
87
|
{
|
|
70
88
|
id: "nemotron-3-ultra-free",
|
|
71
89
|
name: "Nemotron 3 Ultra (1M) [OpenCode]",
|
|
@@ -135,25 +153,20 @@ export const OPENCODE_MODELS: ModelDef[] = [
|
|
|
135
153
|
},
|
|
136
154
|
},
|
|
137
155
|
{
|
|
138
|
-
id: "
|
|
139
|
-
name: "
|
|
156
|
+
id: "space-bunny-free",
|
|
157
|
+
name: "Space Bunny Free (1M) [OpenCode]",
|
|
140
158
|
reasoning: true,
|
|
141
|
-
contextWindow:
|
|
142
|
-
maxTokens:
|
|
143
|
-
api: "anthropic-messages",
|
|
159
|
+
contextWindow: 1_048_576,
|
|
160
|
+
maxTokens: 524_288,
|
|
144
161
|
input: ["text", "image"],
|
|
145
|
-
// Effort wire values verified live 2026-09-17: POST /zen/v1/messages
|
|
146
|
-
// with output_config.effort returns 200 for low/high/xhigh, 503 for
|
|
147
|
-
// max. Passed through verbatim so the picker exposes exactly the
|
|
148
|
-
// levels upstream serves (minimal/medium hidden, unprobed).
|
|
149
162
|
thinkingLevelMap: {
|
|
150
163
|
off: null,
|
|
151
164
|
minimal: null,
|
|
152
165
|
low: "low",
|
|
153
|
-
medium:
|
|
166
|
+
medium: "medium",
|
|
154
167
|
high: "high",
|
|
155
168
|
xhigh: "xhigh",
|
|
156
|
-
max:
|
|
169
|
+
max: "max",
|
|
157
170
|
},
|
|
158
171
|
},
|
|
159
172
|
];
|
|
@@ -189,16 +202,6 @@ export const KILO_MODELS: ModelDef[] = [
|
|
|
189
202
|
thinkingFormat: "openrouter",
|
|
190
203
|
thinkingLevelMap: KILO_REASONING_MAP,
|
|
191
204
|
},
|
|
192
|
-
{
|
|
193
|
-
id: "stepfun/step-3.7-flash:free",
|
|
194
|
-
name: "Step 3.7 Flash [Kilo]",
|
|
195
|
-
reasoning: true,
|
|
196
|
-
contextWindow: 262_144,
|
|
197
|
-
maxTokens: 262_144,
|
|
198
|
-
input: ["text", "image"],
|
|
199
|
-
thinkingFormat: "openrouter",
|
|
200
|
-
thinkingLevelMap: KILO_REASONING_MAP,
|
|
201
|
-
},
|
|
202
205
|
{
|
|
203
206
|
id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",
|
|
204
207
|
name: "Nemotron 3 Nano Omni [Kilo]",
|
|
@@ -358,15 +361,25 @@ export const KILO_MODELS: ModelDef[] = [
|
|
|
358
361
|
thinkingLevelMap: KILO_REASONING_MAP,
|
|
359
362
|
},
|
|
360
363
|
{
|
|
361
|
-
id: "
|
|
362
|
-
name: "
|
|
364
|
+
id: "qwen/qwen3.8-27b:free",
|
|
365
|
+
name: "Qwen 3.8 27B [Kilo]",
|
|
363
366
|
reasoning: true,
|
|
364
367
|
contextWindow: 262_144,
|
|
365
|
-
maxTokens:
|
|
368
|
+
maxTokens: 235_929,
|
|
366
369
|
input: ["text", "image"],
|
|
367
370
|
thinkingFormat: "openrouter",
|
|
368
371
|
thinkingLevelMap: KILO_REASONING_MAP,
|
|
369
372
|
},
|
|
373
|
+
{
|
|
374
|
+
id: "z-ai/glm-5.2:free",
|
|
375
|
+
name: "GLM 5.2 [Kilo]",
|
|
376
|
+
reasoning: true,
|
|
377
|
+
contextWindow: 32_768,
|
|
378
|
+
maxTokens: 29_491,
|
|
379
|
+
input: ["text"],
|
|
380
|
+
thinkingFormat: "openrouter",
|
|
381
|
+
thinkingLevelMap: KILO_REASONING_MAP,
|
|
382
|
+
},
|
|
370
383
|
];
|
|
371
384
|
|
|
372
385
|
/**
|
|
@@ -384,7 +397,7 @@ const CLINE_REASONING_MAP: ThinkingLevelMap = {
|
|
|
384
397
|
max: "max",
|
|
385
398
|
};
|
|
386
399
|
/**
|
|
387
|
-
* Narrow effort map for DeepSeek V4 Flash + GLM Flash — reference
|
|
400
|
+
* Narrow effort map for DeepSeek V4 Flash + GLM Flash + Kimi K3 — reference
|
|
388
401
|
* reasoningOptions list effort values [low, high, max] only (no toggle
|
|
389
402
|
* on GLM); minimal/medium/xhigh are not offered so the host never sends
|
|
390
403
|
* an unsupported level (the proxy forwards effort verbatim).
|
|
@@ -443,6 +456,19 @@ export const CLINE_MODELS: ModelDef[] = [
|
|
|
443
456
|
input: ["text", "image"],
|
|
444
457
|
thinkingLevelMap: CLINE_FLASH_REASONING_MAP,
|
|
445
458
|
},
|
|
459
|
+
{
|
|
460
|
+
// Cline advertises this sixth free model only to its desktop client
|
|
461
|
+
// identity (see CLINE_CLIENT_HEADERS). Specs follow the vendored Cline
|
|
462
|
+
// catalog; maxTokens keeps the tighter chat value so a request can never
|
|
463
|
+
// overrun what the chat endpoint accepts.
|
|
464
|
+
id: "cline-free/kimi-k3",
|
|
465
|
+
name: "Kimi K3 [Cline]",
|
|
466
|
+
reasoning: true,
|
|
467
|
+
contextWindow: 1_048_576,
|
|
468
|
+
maxTokens: 131_072,
|
|
469
|
+
input: ["text", "image"],
|
|
470
|
+
thinkingLevelMap: CLINE_FLASH_REASONING_MAP,
|
|
471
|
+
},
|
|
446
472
|
{
|
|
447
473
|
id: "cline-free/solar-pro4",
|
|
448
474
|
name: "Solar Pro4 [Cline]",
|
|
@@ -463,7 +489,6 @@ export const CLINE_MODELS: ModelDef[] = [
|
|
|
463
489
|
*/
|
|
464
490
|
export const MODEL_ALIASES: Record<string, string> = {
|
|
465
491
|
"dots-3-note-preview": "dots-studio/dots-3-note-preview:free",
|
|
466
|
-
"step-3.7-flash": "stepfun/step-3.7-flash:free",
|
|
467
492
|
"nemotron-3-nano-omni": "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",
|
|
468
493
|
"nemotron-3-ultra-550b": "nvidia/nemotron-3-ultra-550b-a55b:free",
|
|
469
494
|
"nemotron-3.5-lightning": "nvidia/nemotron-3.5-lightning:free",
|
|
@@ -473,10 +498,13 @@ export const MODEL_ALIASES: Record<string, string> = {
|
|
|
473
498
|
"content-safety": "nvidia/nemotron-3.5-content-safety:free",
|
|
474
499
|
"ling-3.0-flash-fin": "inclusionai/ling-3.0-flash-fin:free",
|
|
475
500
|
"ling-3.0-flash-sante": "inclusionai/ling-3.0-flash-sante:free",
|
|
476
|
-
"ling-3.0-flash-vl": "inclusionai/ling-3.0-flash-vl:free",
|
|
477
501
|
"nex-n2.5-pro": "nex-agi/nex-n2.5-pro:free",
|
|
478
502
|
"nex-n2.5-mini": "nex-agi/nex-n2.5-mini:free",
|
|
479
503
|
"inkling-small": "thinkingmachines/inkling-small:free",
|
|
504
|
+
"mimo-v2.6-flash": "mimo-v2.6-flash-free",
|
|
505
|
+
"space-bunny": "space-bunny-free",
|
|
506
|
+
"qwen3.8-27b": "qwen/qwen3.8-27b:free",
|
|
507
|
+
"glm-5.2": "z-ai/glm-5.2:free",
|
|
480
508
|
// provider-prefixed short aliases (slash-normalized)
|
|
481
509
|
"laguna-s-2.1:free": "poolside/laguna-s-2.1:free",
|
|
482
510
|
"laguna-xs-2.1:free": "poolside/laguna-xs-2.1:free",
|
|
@@ -512,7 +540,7 @@ export const CLINE_MODEL_IDS = new Set<string>([
|
|
|
512
540
|
]);
|
|
513
541
|
|
|
514
542
|
/**
|
|
515
|
-
* Combined list of all
|
|
543
|
+
* Combined list of all 33 static free models (canonical)
|
|
516
544
|
*/
|
|
517
545
|
export const ALL_MODELS: ModelDef[] = [...OPENCODE_MODELS, ...KILO_MODELS, ...CLINE_MODELS];
|
|
518
546
|
|