@agentv/core 4.5.2 → 4.6.1
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/{chunk-M65PVDQ5.js → chunk-ZK4GG7PR.js} +87 -5
- package/dist/chunk-ZK4GG7PR.js.map +1 -0
- package/dist/evaluation/validation/index.cjs +15 -6
- package/dist/evaluation/validation/index.cjs.map +1 -1
- package/dist/evaluation/validation/index.js +7 -4
- package/dist/evaluation/validation/index.js.map +1 -1
- package/dist/index.cjs +322 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +245 -98
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-M65PVDQ5.js.map +0 -1
|
@@ -949,21 +949,27 @@ var CLI_PLACEHOLDERS = /* @__PURE__ */ new Set([
|
|
|
949
949
|
"OUTPUT_FILE"
|
|
950
950
|
]);
|
|
951
951
|
var COMMON_TARGET_SETTINGS = [
|
|
952
|
+
"use_target",
|
|
952
953
|
"provider_batching",
|
|
953
954
|
"providerBatching",
|
|
954
955
|
"subagent_mode_allowed",
|
|
955
|
-
"subagentModeAllowed"
|
|
956
|
+
"subagentModeAllowed",
|
|
957
|
+
"fallback_targets",
|
|
958
|
+
"fallbackTargets"
|
|
956
959
|
];
|
|
957
960
|
var BASE_TARGET_SCHEMA = import_zod.z.object({
|
|
958
961
|
name: import_zod.z.string().min(1, "target name is required"),
|
|
959
|
-
provider: import_zod.z.string().
|
|
962
|
+
provider: import_zod.z.string().optional(),
|
|
963
|
+
use_target: import_zod.z.string().optional(),
|
|
960
964
|
grader_target: import_zod.z.string().optional(),
|
|
961
965
|
judge_target: import_zod.z.string().optional(),
|
|
962
966
|
// backward compat
|
|
963
967
|
workers: import_zod.z.number().int().min(1).optional(),
|
|
964
968
|
workspace_template: import_zod.z.string().optional(),
|
|
965
969
|
workspaceTemplate: import_zod.z.string().optional(),
|
|
966
|
-
subagent_mode_allowed: import_zod.z.boolean().optional()
|
|
970
|
+
subagent_mode_allowed: import_zod.z.boolean().optional(),
|
|
971
|
+
fallback_targets: import_zod.z.array(import_zod.z.string().min(1)).optional(),
|
|
972
|
+
fallbackTargets: import_zod.z.array(import_zod.z.string().min(1)).optional()
|
|
967
973
|
}).passthrough();
|
|
968
974
|
|
|
969
975
|
// src/evaluation/providers/types.ts
|
|
@@ -1056,6 +1062,8 @@ var OPENAI_SETTINGS = /* @__PURE__ */ new Set([
|
|
|
1056
1062
|
"model",
|
|
1057
1063
|
"deployment",
|
|
1058
1064
|
"variant",
|
|
1065
|
+
"api_format",
|
|
1066
|
+
"apiFormat",
|
|
1059
1067
|
"temperature",
|
|
1060
1068
|
"max_output_tokens",
|
|
1061
1069
|
"maxTokens"
|
|
@@ -1448,16 +1456,17 @@ async function validateTargetsFile(filePath) {
|
|
|
1448
1456
|
});
|
|
1449
1457
|
}
|
|
1450
1458
|
const provider = target.provider;
|
|
1459
|
+
const hasUseTarget = typeof target.use_target === "string" && target.use_target.trim().length > 0;
|
|
1451
1460
|
const providerValue = typeof provider === "string" ? provider.trim().toLowerCase() : void 0;
|
|
1452
1461
|
const isTemplated = typeof provider === "string" && /^\$\{\{.+\}\}$/.test(provider.trim());
|
|
1453
|
-
if (typeof provider !== "string" || provider.trim().length === 0) {
|
|
1462
|
+
if (!hasUseTarget && (typeof provider !== "string" || provider.trim().length === 0)) {
|
|
1454
1463
|
errors.push({
|
|
1455
1464
|
severity: "error",
|
|
1456
1465
|
filePath: absolutePath,
|
|
1457
1466
|
location: `${location}.provider`,
|
|
1458
|
-
message: "Missing or invalid 'provider' field (must be a non-empty string)"
|
|
1467
|
+
message: "Missing or invalid 'provider' field (must be a non-empty string, or use use_target for delegation)"
|
|
1459
1468
|
});
|
|
1460
|
-
} else if (!isTemplated && !knownProviders.includes(provider)) {
|
|
1469
|
+
} else if (typeof provider === "string" && !isTemplated && !knownProviders.includes(provider)) {
|
|
1461
1470
|
errors.push({
|
|
1462
1471
|
severity: "warning",
|
|
1463
1472
|
filePath: absolutePath,
|