pi-freeflow 1.4.0 → 1.4.1
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/package.json +1 -1
- package/src/index.ts +2 -2
- package/src/models.ts +12 -19
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-freeflow",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"description": "Thin provider for OMP/Pi — model list + dumb relay proxy + log; host pi-ai owns thinking/normalization",
|
|
6
6
|
"main": "extensions/index.ts",
|
|
7
7
|
"types": "src/index.ts",
|
package/src/index.ts
CHANGED
|
@@ -139,11 +139,11 @@ export default async function (pi: ExtensionAPI): Promise<void> {
|
|
|
139
139
|
|
|
140
140
|
// 3. Instant 0ms Static Catalog Registration
|
|
141
141
|
// Register static models immediately on boot so Pi/OMP picker is populated with zero latency!
|
|
142
|
-
const registeredCatalog: RegisteredModel[] =
|
|
142
|
+
const registeredCatalog: RegisteredModel[] = ALL_MODELS.map((m) => ({
|
|
143
143
|
...m,
|
|
144
144
|
source: KILO_MODEL_IDS.has(m.id) ? "kilo" : "opencode",
|
|
145
145
|
}));
|
|
146
|
-
setAliveCatalog(
|
|
146
|
+
setAliveCatalog(registeredCatalog);
|
|
147
147
|
pi.registerProvider(
|
|
148
148
|
"freeflow",
|
|
149
149
|
buildProviderConfig(registeredCatalog, actualPort),
|
package/src/models.ts
CHANGED
|
@@ -357,36 +357,29 @@ export const KILO_MODEL_IDS = new Set<string>([
|
|
|
357
357
|
]);
|
|
358
358
|
|
|
359
359
|
/**
|
|
360
|
-
* Combined list of all 23 static free models
|
|
360
|
+
* Combined list of all 23 static free models (canonical)
|
|
361
361
|
*/
|
|
362
362
|
export const ALL_MODELS: ModelDef[] = [...OPENCODE_MODELS, ...KILO_MODELS];
|
|
363
363
|
|
|
364
364
|
/**
|
|
365
365
|
* Map of model ID -> ModelDef
|
|
366
366
|
*/
|
|
367
|
-
export const MODEL_MAP = new Map<string, ModelDef>(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
return [
|
|
372
|
-
aliasId,
|
|
373
|
-
base
|
|
374
|
-
? { ...base, id: aliasId }
|
|
375
|
-
: { id: aliasId, name: aliasId, reasoning: false, contextWindow: 200_000, maxTokens: 32_000, input: ["text"] },
|
|
376
|
-
];
|
|
377
|
-
}),
|
|
378
|
-
]);
|
|
367
|
+
export const MODEL_MAP = new Map<string, ModelDef>(
|
|
368
|
+
ALL_MODELS.map((m): [string, ModelDef] => [m.id, m]),
|
|
369
|
+
);
|
|
370
|
+
|
|
379
371
|
/**
|
|
380
|
-
*
|
|
372
|
+
* Get full list of registered canonical models for Pi/OMP provider registration
|
|
381
373
|
*/
|
|
382
|
-
export function
|
|
383
|
-
return
|
|
374
|
+
export function getAllRegisteredModels(): ModelDef[] {
|
|
375
|
+
return ALL_MODELS;
|
|
384
376
|
}
|
|
377
|
+
|
|
385
378
|
/**
|
|
386
|
-
*
|
|
379
|
+
* Lookup a model definition by ID (supporting alias fallback)
|
|
387
380
|
*/
|
|
388
|
-
export function
|
|
389
|
-
return
|
|
381
|
+
export function getModelDef(id: string): ModelDef | undefined {
|
|
382
|
+
return MODEL_MAP.get(id) || MODEL_MAP.get(resolveCanonicalModelId(id));
|
|
390
383
|
}
|
|
391
384
|
|
|
392
385
|
|