@wix/evalforge-evaluator 0.179.0 → 0.181.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.
@@ -54,6 +54,27 @@ export interface ApiClientOptions {
54
54
  */
55
55
  httpClient?: IHttpClient;
56
56
  }
57
+ /**
58
+ * Resolve the `baseURL` for the ambassador `HttpClient` from the configured
59
+ * `serverUrl`.
60
+ *
61
+ * The ambassador request factories emit fully-qualified gateway paths that
62
+ * already include the `/_api/evalforge-backend` prefix (e.g.
63
+ * `/_api/evalforge-backend/v1/projects/{id}/eval-runs/{id}`). `serverUrl` also
64
+ * carries that prefix — it is the REST base `putJson` uses for the one
65
+ * remaining legacy write (`updateEvalRun`) — so using it directly as the
66
+ * HttpClient `baseURL` duplicates the prefix
67
+ * (`.../_api/evalforge-backend/_api/evalforge-backend/v1/...`) and every
68
+ * ambassador call 404s: the run starts but the evaluator can't fetch its data,
69
+ * so the eval fails with no results.
70
+ *
71
+ * Returning the origin only keeps the ambassador-emitted path intact while the
72
+ * REST `updateEvalRun` write keeps using the full `serverUrl`. Origin-only
73
+ * inputs (the local in-cluster `http://host:port`) are returned unchanged.
74
+ *
75
+ * @param serverUrl - Base URL of the server (e.g., "https://bo.wix.com/_api/evalforge-backend")
76
+ */
77
+ export declare function resolveAmbassadorBaseUrl(serverUrl: string): string;
57
78
  /**
58
79
  * Create an API client for the eval server.
59
80
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/evalforge-evaluator",
3
- "version": "0.179.0",
3
+ "version": "0.181.0",
4
4
  "description": "EvalForge Evaluator",
5
5
  "bin": "./build/index.js",
6
6
  "files": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "evalforge-evaluator"
72
72
  }
73
73
  },
74
- "falconPackageHash": "ec6cd7242df122dacec1fb89f46734131adb2f8a98afb93362b7bef7"
74
+ "falconPackageHash": "493d50fade4c488a41b6d072b1d1b500cc4c7dea4090888d9e34ac38"
75
75
  }