rlm-cli 0.2.6 → 0.2.7
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/dist/interactive.js +40 -3
- package/package.json +1 -1
package/dist/interactive.js
CHANGED
|
@@ -464,6 +464,41 @@ function displaySubQueryResult(info) {
|
|
|
464
464
|
console.log(` ${c.magenta}└─${c.reset} ${c.dim}${elapsed}s · ${formatSize(info.resultLength)} received${c.reset}`);
|
|
465
465
|
}
|
|
466
466
|
// ── Available models list ────────────────────────────────────────────────────
|
|
467
|
+
/** Filter out deprecated, legacy, preview-only, and non-chat models. */
|
|
468
|
+
const EXCLUDED_MODEL_PATTERNS = [
|
|
469
|
+
// Anthropic legacy
|
|
470
|
+
/^claude-3-haiku/,
|
|
471
|
+
/^claude-3-sonnet/,
|
|
472
|
+
/^claude-3-opus/,
|
|
473
|
+
/^claude-3-5-sonnet-20240620/, // superseded by v2
|
|
474
|
+
// OpenAI legacy
|
|
475
|
+
/^gpt-4$/, // base gpt-4
|
|
476
|
+
/^gpt-4-turbo/, // gpt-4-turbo
|
|
477
|
+
/^gpt-4o-2024-/, // old dated snapshots
|
|
478
|
+
// Non-chat / specialized
|
|
479
|
+
/^codex-/,
|
|
480
|
+
/^gpt-5\.\d+-codex/,
|
|
481
|
+
/^gpt-5-codex/,
|
|
482
|
+
/^gpt-5\.3-codex/,
|
|
483
|
+
/deep-research$/,
|
|
484
|
+
/^gemini-live-/,
|
|
485
|
+
/^grok-beta$/,
|
|
486
|
+
/^grok-vision-beta$/,
|
|
487
|
+
/^grok-2-vision/,
|
|
488
|
+
// Old/niche Mistral
|
|
489
|
+
/^open-mistral-7b$/,
|
|
490
|
+
/^open-mixtral-/,
|
|
491
|
+
/^mistral-nemo$/,
|
|
492
|
+
// Dated previews (keep only -latest and stable)
|
|
493
|
+
/preview-\d{2}-\d{2}$/, // e.g. preview-04-17, preview-05-20
|
|
494
|
+
/preview-\d{2}-\d{4}$/, // e.g. preview-09-2025
|
|
495
|
+
/^labs-/,
|
|
496
|
+
// Specialized/internal variants
|
|
497
|
+
/-customtools$/,
|
|
498
|
+
];
|
|
499
|
+
function isModelExcluded(modelId) {
|
|
500
|
+
return EXCLUDED_MODEL_PATTERNS.some((p) => p.test(modelId));
|
|
501
|
+
}
|
|
467
502
|
/** Collect models from providers that have an API key set. */
|
|
468
503
|
function getAvailableModels() {
|
|
469
504
|
const items = [];
|
|
@@ -472,7 +507,8 @@ function getAvailableModels() {
|
|
|
472
507
|
if (!process.env[key] && provider !== detectProvider())
|
|
473
508
|
continue;
|
|
474
509
|
for (const m of getModels(provider)) {
|
|
475
|
-
|
|
510
|
+
if (!isModelExcluded(m.id))
|
|
511
|
+
items.push({ id: m.id, provider });
|
|
476
512
|
}
|
|
477
513
|
}
|
|
478
514
|
return items;
|
|
@@ -484,7 +520,8 @@ function getModelsForProvider(providerName) {
|
|
|
484
520
|
if (provider !== providerName)
|
|
485
521
|
continue;
|
|
486
522
|
for (const m of getModels(provider)) {
|
|
487
|
-
|
|
523
|
+
if (!isModelExcluded(m.id))
|
|
524
|
+
items.push({ id: m.id, provider });
|
|
488
525
|
}
|
|
489
526
|
}
|
|
490
527
|
return items;
|
|
@@ -731,7 +768,7 @@ async function interactive() {
|
|
|
731
768
|
// Validate env
|
|
732
769
|
if (!hasAnyApiKey()) {
|
|
733
770
|
printBanner();
|
|
734
|
-
console.log(` ${c.
|
|
771
|
+
console.log(` ${c.bold}Welcome! Let's get you set up.${c.reset}\n`);
|
|
735
772
|
const setupRl = readline.createInterface({ input: stdin, output: stdout, terminal: true });
|
|
736
773
|
let setupDone = false;
|
|
737
774
|
while (!setupDone) {
|