@wix/evalforge-evaluator 0.208.0 → 0.210.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/build/index.mjs CHANGED
@@ -5740,6 +5740,12 @@ function resolveWixEvalforgeV1TestScenarioServiceUrl(opts) {
5740
5740
  srcPath: "/_api/evalforge-backend",
5741
5741
  destPath: ""
5742
5742
  }
5743
+ ],
5744
+ "www.wixapis.com": [
5745
+ {
5746
+ srcPath: "/_api/evalforge-backend",
5747
+ destPath: ""
5748
+ }
5743
5749
  ]
5744
5750
  };
5745
5751
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -6466,6 +6472,12 @@ var WebhookIdentityType;
6466
6472
  WebhookIdentityType2["WIX_USER"] = "WIX_USER";
6467
6473
  WebhookIdentityType2["APP"] = "APP";
6468
6474
  })(WebhookIdentityType || (WebhookIdentityType = {}));
6475
+ var Status;
6476
+ (function(Status2) {
6477
+ Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
6478
+ Status2["VALID"] = "VALID";
6479
+ Status2["INVALID"] = "INVALID";
6480
+ })(Status || (Status = {}));
6469
6481
  var SiteBootstrapHttpMethod;
6470
6482
  (function(SiteBootstrapHttpMethod2) {
6471
6483
  SiteBootstrapHttpMethod2["SITE_BOOTSTRAP_HTTP_METHOD_UNSPECIFIED"] = "SITE_BOOTSTRAP_HTTP_METHOD_UNSPECIFIED";
@@ -11025,7 +11037,14 @@ function calculateFromPricing(modelId, tokenUsage) {
11025
11037
  return tokenUsage.prompt / 1e6 * pricing.input + tokenUsage.completion / 1e6 * pricing.output;
11026
11038
  }
11027
11039
  function calculateStepCost(step, modelId, provider, tokenUsage) {
11028
- return extractGatewayCost(step, provider) ?? calculateFromPricing(modelId, tokenUsage);
11040
+ const gatewayCost = extractGatewayCost(step, provider);
11041
+ if (gatewayCost !== void 0) {
11042
+ return gatewayCost;
11043
+ }
11044
+ console.warn(
11045
+ `[cost-calculation] gateway cost missing; using list-price fallback (provider=${provider}, model=${modelId}, promptTokens=${tokenUsage.prompt}, completionTokens=${tokenUsage.completion})`
11046
+ );
11047
+ return calculateFromPricing(modelId, tokenUsage);
11029
11048
  }
11030
11049
 
11031
11050
  // src/run-scenario/agents/simple-agent/build-conversation.ts