rlm-cli 0.2.20 → 0.2.21
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/cli.js +1 -1
- package/dist/interactive.js +24 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -77,7 +77,7 @@ function parseArgs() {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
if (!modelId) {
|
|
80
|
-
modelId = process.env.RLM_MODEL || "claude-sonnet-4-
|
|
80
|
+
modelId = process.env.RLM_MODEL || "claude-sonnet-4-6";
|
|
81
81
|
}
|
|
82
82
|
if (positional.length === 0) {
|
|
83
83
|
console.error("Error: query argument is required");
|
package/dist/interactive.js
CHANGED
|
@@ -1127,11 +1127,32 @@ async function interactive() {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
setupRl.close();
|
|
1129
1129
|
}
|
|
1130
|
-
// Resolve model
|
|
1130
|
+
// Resolve model — ensure the resolved provider actually has an API key
|
|
1131
1131
|
const initialResolved = resolveModelWithProvider(currentModelId);
|
|
1132
1132
|
if (initialResolved) {
|
|
1133
|
-
|
|
1134
|
-
|
|
1133
|
+
const resolvedKey = providerEnvKey(initialResolved.provider);
|
|
1134
|
+
if (process.env[resolvedKey]) {
|
|
1135
|
+
// Provider has a key — use it
|
|
1136
|
+
currentModel = initialResolved.model;
|
|
1137
|
+
currentProviderName = initialResolved.provider;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
// If default model's provider has no key, fall back to a provider that does
|
|
1141
|
+
if (!currentModel) {
|
|
1142
|
+
const activeProvider = detectProvider();
|
|
1143
|
+
if (activeProvider !== "unknown") {
|
|
1144
|
+
const fallbackModel = getDefaultModelForProvider(activeProvider);
|
|
1145
|
+
if (fallbackModel) {
|
|
1146
|
+
const fallbackResolved = resolveModelWithProvider(fallbackModel);
|
|
1147
|
+
if (fallbackResolved) {
|
|
1148
|
+
currentModelId = fallbackModel;
|
|
1149
|
+
currentModel = fallbackResolved.model;
|
|
1150
|
+
currentProviderName = fallbackResolved.provider;
|
|
1151
|
+
const label = findSetupProvider(activeProvider)?.name || activeProvider;
|
|
1152
|
+
console.log(` ${c.dim}Using ${label} (${currentModelId})${c.reset}`);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1135
1156
|
}
|
|
1136
1157
|
if (!currentModel) {
|
|
1137
1158
|
console.log(`\n ${c.red}Model "${currentModelId}" not found.${c.reset}`);
|