omo-recommend-models 1.0.0 → 1.0.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/README.md CHANGED
@@ -7,7 +7,7 @@ A CLI utility that profiles your GPU and recommends the most optimized local and
7
7
  Run the utility in your project directory to evaluate your hardware and update your model registry:
8
8
 
9
9
  ```
10
- $ npx npx omo-recommend-models --cloud-only --yes
10
+ $ npx omo-recommend-models --cloud-only --yes
11
11
 
12
12
  ◇ Checking GPU: skipped by --cloud-only
13
13
 
@@ -584,16 +584,34 @@ function selectedPanelRequiresOpencode(config, explicitModels) {
584
584
  return true;
585
585
  }
586
586
 
587
- function defaultPanelModels(config) {
588
- const allFree = sortPanelModelRefs(discoverFreeModels(), config);
587
+ function opencodePanelModelsFromLookup(cloudLookup) {
588
+ const modelMap = cloudLookup?.byId?.opencode;
589
+ if (!modelMap) return [];
590
+ const ids =
591
+ modelMap instanceof Map
592
+ ? [...modelMap.keys()]
593
+ : Object.keys(modelMap);
594
+ return ids
595
+ .map((id) => String(id || "").trim())
596
+ .filter(Boolean)
597
+ .map((id) => (id.startsWith("opencode/") ? id : `opencode/${id}`));
598
+ }
599
+
600
+ function defaultPanelModels(config, cloudLookup = null) {
601
+ const discovered = discoverFreeModels();
602
+ const refs =
603
+ discovered.length > 0
604
+ ? discovered
605
+ : opencodePanelModelsFromLookup(cloudLookup);
606
+ const allFree = sortPanelModelRefs(refs, config);
589
607
  const MAX_PANEL = 5;
590
608
  return allFree.length > MAX_PANEL ? allFree.slice(0, MAX_PANEL) : allFree;
591
609
  }
592
610
 
593
- function plannedPanelModels(config, panelModels) {
611
+ function plannedPanelModels(config, panelModels, cloudLookup = null) {
594
612
  if (panelModels && panelModels.length > 0) return panelModels;
595
613
  const configured = configuredPanelModels(config);
596
- return configured.length > 0 ? configured : defaultPanelModels(config);
614
+ return configured.length > 0 ? configured : defaultPanelModels(config, cloudLookup);
597
615
  }
598
616
 
599
617
  function createProgress(label) {
@@ -2340,7 +2358,7 @@ async function runPanelAndSelect(
2340
2358
  if (panelModels && panelModels.length > 0) {
2341
2359
  models = panelModels;
2342
2360
  } else {
2343
- models = defaultPanelModels(config);
2361
+ models = defaultPanelModels(config, cloudLookup);
2344
2362
  if (models.length === 0) throw new Error("No free models available");
2345
2363
  }
2346
2364
 
@@ -2370,7 +2388,7 @@ async function runPanelAndSelect(
2370
2388
  }
2371
2389
 
2372
2390
  console.log("\nFalling back to free opencode models...");
2373
- const freeModels = defaultPanelModels(config);
2391
+ const freeModels = defaultPanelModels(config, cloudLookup);
2374
2392
  if (freeModels.length === 0) {
2375
2393
  throw new Error("No free models available");
2376
2394
  }
@@ -3692,7 +3710,7 @@ async function main() {
3692
3710
  if (usePaid) {
3693
3711
  panelModels = availablePaid.slice(0, 5);
3694
3712
  } else {
3695
- panelModels = defaultPanelModels(config);
3713
+ panelModels = defaultPanelModels(config, cloudLookup);
3696
3714
  opencodeOnlyMode = true;
3697
3715
  }
3698
3716
  } else {
@@ -3709,7 +3727,7 @@ async function main() {
3709
3727
  }
3710
3728
  }
3711
3729
  console.log("\n Falling back to free opencode models.\n");
3712
- panelModels = defaultPanelModels(config);
3730
+ panelModels = defaultPanelModels(config, cloudLookup);
3713
3731
  opencodeOnlyMode = true;
3714
3732
  }
3715
3733
  }
@@ -3721,7 +3739,7 @@ async function main() {
3721
3739
  if (availablePaid.length > 0 && !localOnly) {
3722
3740
  panelModels = availablePaid.slice(0, 5);
3723
3741
  } else {
3724
- panelModels = defaultPanelModels(config);
3742
+ panelModels = defaultPanelModels(config, cloudLookup);
3725
3743
  opencodeOnlyMode = true;
3726
3744
  }
3727
3745
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omo-recommend-models",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Consolidated AI-powered model recommendation CLI for OpenCode OMO agent configurations",
5
5
  "type": "module",
6
6
  "bin": {