@link-assistant/agent 0.24.1 → 0.24.2
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/cli/model-config.js +18 -5
package/package.json
CHANGED
package/src/cli/model-config.js
CHANGED
|
@@ -302,7 +302,10 @@ async function resolveCompactionModelEntry(
|
|
|
302
302
|
|
|
303
303
|
// Short name resolution
|
|
304
304
|
const { Provider } = await import('../provider/provider.ts');
|
|
305
|
-
const resolved = await Provider.
|
|
305
|
+
const resolved = await Provider.resolveShortModelName(modelArg);
|
|
306
|
+
if (!resolved) {
|
|
307
|
+
throw new Error('ProviderModelNotFoundError');
|
|
308
|
+
}
|
|
306
309
|
return {
|
|
307
310
|
providerID: resolved.providerID,
|
|
308
311
|
modelID: resolved.modelID,
|
|
@@ -336,10 +339,17 @@ async function parseCompactionModelConfig(
|
|
|
336
339
|
|
|
337
340
|
// Check for --compaction-models (cascade) first — it overrides --compaction-model
|
|
338
341
|
const cliCompactionModelsArg = getCompactionModelsFromProcessArgv();
|
|
342
|
+
const defaultCompactionModels = getDefaultCompactionModels(defaultOptions);
|
|
343
|
+
const compactionModelsSource =
|
|
344
|
+
cliCompactionModelsArg ||
|
|
345
|
+
(argv['compaction-models'] &&
|
|
346
|
+
argv['compaction-models'] !== defaultCompactionModels)
|
|
347
|
+
? 'cli'
|
|
348
|
+
: 'default';
|
|
339
349
|
const compactionModelsArg =
|
|
340
350
|
cliCompactionModelsArg ??
|
|
341
351
|
argv['compaction-models'] ??
|
|
342
|
-
|
|
352
|
+
defaultCompactionModels;
|
|
343
353
|
|
|
344
354
|
// Parse the links notation sequence into an array of model names
|
|
345
355
|
const modelNames = parseLinksNotationSequence(compactionModelsArg);
|
|
@@ -360,8 +370,11 @@ async function parseCompactionModelConfig(
|
|
|
360
370
|
useSameModel: resolved.useSameModel,
|
|
361
371
|
});
|
|
362
372
|
} catch (err) {
|
|
363
|
-
|
|
364
|
-
|
|
373
|
+
const logSkip =
|
|
374
|
+
compactionModelsSource === 'default'
|
|
375
|
+
? Log.Default.debug
|
|
376
|
+
: Log.Default.warn;
|
|
377
|
+
logSkip(() => ({
|
|
365
378
|
message: 'skipping unresolvable compaction model in cascade',
|
|
366
379
|
model: name,
|
|
367
380
|
error: err?.message,
|
|
@@ -374,7 +387,7 @@ async function parseCompactionModelConfig(
|
|
|
374
387
|
models: compactionModels.map((m) =>
|
|
375
388
|
m.useSameModel ? 'same' : `${m.providerID}/${m.modelID}`
|
|
376
389
|
),
|
|
377
|
-
source:
|
|
390
|
+
source: compactionModelsSource,
|
|
378
391
|
}));
|
|
379
392
|
|
|
380
393
|
// Use the first model as the primary compaction model (for backward compatibility)
|