@infersec/conduit 1.6.4 → 1.7.0

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 CHANGED
@@ -6,7 +6,7 @@ const __dirname = __pathDirname(__filename);
6
6
 
7
7
  import { parseArgs } from 'node:util';
8
8
  import 'node:crypto';
9
- import { a as asError, s as startInferenceAgent } from './start-D9p7R0lT.js';
9
+ import { a as asError, s as startInferenceAgent } from './start-BF-CnHXg.js';
10
10
  import 'argon2';
11
11
  import 'node:child_process';
12
12
  import 'node:stream';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ const __filename = __fileURLToPath(import.meta.url);
5
5
  const __dirname = __pathDirname(__filename);
6
6
 
7
7
  import 'node:crypto';
8
- import { s as startInferenceAgent, a as asError } from './start-D9p7R0lT.js';
8
+ import { s as startInferenceAgent, a as asError } from './start-BF-CnHXg.js';
9
9
  import 'argon2';
10
10
  import 'node:child_process';
11
11
  import 'node:stream';
@@ -104902,15 +104902,16 @@ async function findQuantizedModelTarget({ model, path }) {
104902
104902
  if (modelFiles.length <= 0) {
104903
104903
  throw new Error(`No models found for format: ${model.format}`);
104904
104904
  }
104905
+ modelFiles.sort((left, right) => left.localeCompare(right, undefined, { sensitivity: "base" }));
104905
104906
  if (!variant) {
104906
104907
  // Just return the first
104907
104908
  return modelFiles[0];
104908
104909
  }
104909
- const target = modelFiles.find(fileName => fileName.toLowerCase().includes(variant.toLowerCase()));
104910
- if (!target) {
104910
+ const matches = modelFiles.filter(fileName => fileName.toLowerCase().includes(variant.toLowerCase()));
104911
+ if (matches.length === 0) {
104911
104912
  throw new Error(`No model found for format and variant: ${model.format} / ${variant}`);
104912
104913
  }
104913
- return target;
104914
+ return matches[0];
104914
104915
  }
104915
104916
  async function startLlamacpp({ targetDirectory }) {
104916
104917
  const target = await findQuantizedModelTarget({ model: this.model, path: targetDirectory });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infersec/conduit",
3
3
  "description": "End user conduit agent for connecting local LLMs to the cloud.",
4
- "version": "1.6.4",
4
+ "version": "1.7.0",
5
5
  "bin": {
6
6
  "infersec-conduit": "./dist/cli.js"
7
7
  },