@axiom-lattice/gateway 3.0.8 → 3.0.10
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/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -4896,11 +4896,10 @@ var WorkspaceController = class {
|
|
|
4896
4896
|
projectId
|
|
4897
4897
|
};
|
|
4898
4898
|
const filename2 = getFilenameFromPath(resolvedPath);
|
|
4899
|
-
const isBinary = this.isBinaryContentType(filename2);
|
|
4900
4899
|
const volumeBackend = await sandboxManager.getVolumeBackendForPath(volumeConfig, resolvedPath);
|
|
4901
4900
|
let buf;
|
|
4902
4901
|
if (volumeBackend) {
|
|
4903
|
-
if (
|
|
4902
|
+
if (volumeBackend.readBinary) {
|
|
4904
4903
|
buf = await volumeBackend.readBinary(resolvedPath);
|
|
4905
4904
|
} else {
|
|
4906
4905
|
const fileData = await volumeBackend.readRaw(resolvedPath);
|
|
@@ -4915,10 +4914,12 @@ var WorkspaceController = class {
|
|
|
4915
4914
|
return reply.status(200).type(inferredContentType).header("Content-Disposition", contentDisposition).send(buf);
|
|
4916
4915
|
}
|
|
4917
4916
|
const { backend } = await this.getBackend(tenantId, workspaceId, projectId, assistantId, resolvedPath);
|
|
4918
|
-
|
|
4917
|
+
if (!backend.readBinary) {
|
|
4918
|
+
throw new Error("Filesystem backend does not support binary reads");
|
|
4919
|
+
}
|
|
4920
|
+
const buffer = await backend.readBinary(resolvedPath);
|
|
4919
4921
|
const filename = getFilenameFromPath(resolvedPath);
|
|
4920
4922
|
const mimeType = getContentTypeFromFilename(filename);
|
|
4921
|
-
const buffer = Buffer.from(content, "utf-8");
|
|
4922
4923
|
return reply.status(200).type(mimeType).header("Content-Disposition", `attachment; filename*=UTF-8''${encodeURIComponent(filename)}`).send(buffer);
|
|
4923
4924
|
} catch (error) {
|
|
4924
4925
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -6405,12 +6406,15 @@ var EvalRunner = class {
|
|
|
6405
6406
|
}
|
|
6406
6407
|
resolvedJudgeModelKey = judgeModelKey;
|
|
6407
6408
|
} else {
|
|
6408
|
-
const
|
|
6409
|
-
|
|
6409
|
+
const models = modelLatticeManager2.getAllLattices();
|
|
6410
|
+
const defaultModel = models.find((m) => m.key === "default");
|
|
6411
|
+
resolvedJudgeModelKey = defaultModel?.key ?? models[0]?.key ?? "";
|
|
6412
|
+
if (!resolvedJudgeModelKey) {
|
|
6410
6413
|
throw new Error("No model registered \u2014 cannot run eval without a judge model");
|
|
6411
6414
|
}
|
|
6412
|
-
|
|
6413
|
-
|
|
6415
|
+
if (!defaultModel) {
|
|
6416
|
+
console.warn(`[eval-runner] Project "${project.name}" has no judge modelKey and no "default" model \u2014 falling back to first registered model "${resolvedJudgeModelKey}"`);
|
|
6417
|
+
}
|
|
6414
6418
|
}
|
|
6415
6419
|
const runId = uuidv43();
|
|
6416
6420
|
const concurrency = Math.max(1, Math.floor(project.concurrency) || 3);
|