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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-freeflow",
3
3
  "type": "module",
4
- "version": "1.4.0",
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[] = getAllRegisteredModels().map((m) => ({
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(ALL_MODELS.map((m) => ({ ...m, source: KILO_MODEL_IDS.has(m.id) ? "kilo" : "opencode" })));
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
- ...ALL_MODELS.map((m): [string, ModelDef] => [m.id, m]),
369
- ...Object.entries(MODEL_ALIASES).map(([aliasId, canonicalId]): [string, ModelDef] => {
370
- const base = ALL_MODELS.find((m) => m.id === canonicalId);
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
- * Lookup a model definition by ID
372
+ * Get full list of registered canonical models for Pi/OMP provider registration
381
373
  */
382
- export function getModelDef(id: string): ModelDef | undefined {
383
- return MODEL_MAP.get(id) || MODEL_MAP.get(resolveCanonicalModelId(id));
374
+ export function getAllRegisteredModels(): ModelDef[] {
375
+ return ALL_MODELS;
384
376
  }
377
+
385
378
  /**
386
- * Get full list of registered models including CLI aliases
379
+ * Lookup a model definition by ID (supporting alias fallback)
387
380
  */
388
- export function getAllRegisteredModels(): ModelDef[] {
389
- return Array.from(MODEL_MAP.values());
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