@jerome-benoit/sap-ai-provider-v2 4.8.0 → 4.9.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.
Files changed (27) hide show
  1. package/dist/{chunk-H5KD4EPO.js → chunk-33WLQYKB.js} +2 -2
  2. package/dist/{chunk-TQXCNZBC.js → chunk-3KCERYUB.js} +4 -4
  3. package/dist/chunk-3KCERYUB.js.map +1 -0
  4. package/dist/{chunk-3ZSXTKOK.js → chunk-4PLJVJX4.js} +361 -100
  5. package/dist/{chunk-3ZSXTKOK.js.map → chunk-4PLJVJX4.js.map} +1 -1
  6. package/dist/{chunk-KVOLFUQJ.js → chunk-4SQ5HC6Y.js} +2 -2
  7. package/dist/{chunk-BVDSJ4IZ.js → chunk-RW6WSPU2.js} +3 -3
  8. package/dist/{foundation-models-embedding-model-strategy-SWRJNFD4.js → foundation-models-embedding-model-strategy-RVJQSJPU.js} +4 -4
  9. package/dist/{foundation-models-language-model-strategy-LRAC25ZY.js → foundation-models-language-model-strategy-UWJ6FHBI.js} +4 -4
  10. package/dist/index.cjs +361 -100
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +4 -4
  13. package/dist/index.d.ts +4 -4
  14. package/dist/index.js +6 -6
  15. package/dist/index.js.map +1 -1
  16. package/dist/{orchestration-embedding-model-strategy-C5G735Q2.js → orchestration-embedding-model-strategy-OMIXGLHJ.js} +5 -5
  17. package/dist/{orchestration-language-model-strategy-NUHYRIXH.js → orchestration-language-model-strategy-UE7OQO5K.js} +5 -5
  18. package/dist/orchestration-language-model-strategy-UE7OQO5K.js.map +1 -0
  19. package/package.json +19 -19
  20. package/dist/chunk-TQXCNZBC.js.map +0 -1
  21. package/dist/orchestration-language-model-strategy-NUHYRIXH.js.map +0 -1
  22. /package/dist/{chunk-H5KD4EPO.js.map → chunk-33WLQYKB.js.map} +0 -0
  23. /package/dist/{chunk-KVOLFUQJ.js.map → chunk-4SQ5HC6Y.js.map} +0 -0
  24. /package/dist/{chunk-BVDSJ4IZ.js.map → chunk-RW6WSPU2.js.map} +0 -0
  25. /package/dist/{foundation-models-embedding-model-strategy-SWRJNFD4.js.map → foundation-models-embedding-model-strategy-RVJQSJPU.js.map} +0 -0
  26. /package/dist/{foundation-models-language-model-strategy-LRAC25ZY.js.map → foundation-models-language-model-strategy-UWJ6FHBI.js.map} +0 -0
  27. /package/dist/{orchestration-embedding-model-strategy-C5G735Q2.js.map → orchestration-embedding-model-strategy-OMIXGLHJ.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -11764,7 +11764,7 @@ var require_error_with_cause = __commonJS({
11764
11764
  this.addStack(cause);
11765
11765
  }
11766
11766
  isAxiosError(err) {
11767
- return err["isAxiosError"] === true;
11767
+ return "isAxiosError" in err && err.isAxiosError === true;
11768
11768
  }
11769
11769
  addStack(cause) {
11770
11770
  if (this.isAxiosError(cause)) {
@@ -25701,6 +25701,7 @@ var require_axios = __commonJS({
25701
25701
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
25702
25702
  var isBlob = kindOfTest("Blob");
25703
25703
  var isFileList = kindOfTest("FileList");
25704
+ var isSet = kindOfTest("Set");
25704
25705
  var isStream = (val) => isObject(val) && isFunction$1(val.pipe);
25705
25706
  function getGlobal() {
25706
25707
  if (typeof globalThis !== "undefined") return globalThis;
@@ -25998,11 +25999,20 @@ var require_axios = __commonJS({
25998
25999
  }
25999
26000
  if (!("toJSON" in source)) {
26000
26001
  visited.add(source);
26001
- const target = isArray(source) ? [] : {};
26002
- forEach(source, (value, key) => {
26003
- const reducedValue = visit(value);
26004
- !isUndefined(reducedValue) && (target[key] = reducedValue);
26005
- });
26002
+ let target;
26003
+ if (isSet(source)) {
26004
+ target = [];
26005
+ for (const value of source) {
26006
+ const reducedValue = visit(value);
26007
+ !isUndefined(reducedValue) && target.push(reducedValue);
26008
+ }
26009
+ } else {
26010
+ target = isArray(source) ? [] : {};
26011
+ forEach(source, (value, key) => {
26012
+ const reducedValue = visit(value);
26013
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
26014
+ });
26015
+ }
26006
26016
  visited.delete(source);
26007
26017
  return target;
26008
26018
  }
@@ -26110,17 +26120,18 @@ var require_axios = __commonJS({
26110
26120
  i = line.indexOf(":");
26111
26121
  key = line.substring(0, i).trim().toLowerCase();
26112
26122
  val = line.substring(i + 1).trim();
26113
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
26123
+ const hasKey = utils$1.hasOwnProp(parsed, key);
26124
+ if (!key || hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key)) {
26114
26125
  return;
26115
26126
  }
26116
26127
  if (key === "set-cookie") {
26117
- if (parsed[key]) {
26128
+ if (hasKey) {
26118
26129
  parsed[key].push(val);
26119
26130
  } else {
26120
26131
  parsed[key] = [val];
26121
26132
  }
26122
26133
  } else {
26123
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
26134
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
26124
26135
  }
26125
26136
  });
26126
26137
  return parsed;
@@ -26180,6 +26191,90 @@ var require_axios = __commonJS({
26180
26191
  }
26181
26192
  return tokens;
26182
26193
  }
26194
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
26195
+ function trimOWS(value) {
26196
+ let start = 0;
26197
+ let end = value.length;
26198
+ while (start < end) {
26199
+ const code = value.charCodeAt(start);
26200
+ if (code !== 9 && code !== 32) {
26201
+ break;
26202
+ }
26203
+ start += 1;
26204
+ }
26205
+ while (end > start) {
26206
+ const code = value.charCodeAt(end - 1);
26207
+ if (code !== 9 && code !== 32) {
26208
+ break;
26209
+ }
26210
+ end -= 1;
26211
+ }
26212
+ return start === 0 && end === value.length ? value : value.slice(start, end);
26213
+ }
26214
+ function decodeQuotedString(value) {
26215
+ const last2 = value.length - 1;
26216
+ if (last2 < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last2) !== 34) {
26217
+ return value;
26218
+ }
26219
+ let decoded = "";
26220
+ for (let i = 1; i < last2; i++) {
26221
+ const code = value.charCodeAt(i);
26222
+ if (code === 34) {
26223
+ return value;
26224
+ }
26225
+ if (code === 92) {
26226
+ i += 1;
26227
+ if (i >= last2) {
26228
+ return value;
26229
+ }
26230
+ }
26231
+ decoded += value[i];
26232
+ }
26233
+ return decoded;
26234
+ }
26235
+ function parseParameters(value) {
26236
+ const parameters = /* @__PURE__ */ Object.create(null);
26237
+ const str = String(value);
26238
+ let start = 0;
26239
+ let quoted = false;
26240
+ let escaped = false;
26241
+ function parseParameter(end) {
26242
+ const part = trimOWS(str.slice(start, end));
26243
+ const equals = part.indexOf("=");
26244
+ if (equals < 1) {
26245
+ return;
26246
+ }
26247
+ const name = trimOWS(part.slice(0, equals));
26248
+ if (!parameterNameRE.test(name)) {
26249
+ return;
26250
+ }
26251
+ const normalizedName = name.toLowerCase();
26252
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
26253
+ return;
26254
+ }
26255
+ const parameterValue = trimOWS(part.slice(equals + 1));
26256
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
26257
+ }
26258
+ for (let i = 0; i < str.length; i++) {
26259
+ const code = str.charCodeAt(i);
26260
+ if (quoted) {
26261
+ if (escaped) {
26262
+ escaped = false;
26263
+ } else if (code === 92) {
26264
+ escaped = true;
26265
+ } else if (code === 34) {
26266
+ quoted = false;
26267
+ }
26268
+ } else if (code === 34) {
26269
+ quoted = true;
26270
+ } else if (code === 44 || code === 59) {
26271
+ parseParameter(i);
26272
+ start = i + 1;
26273
+ }
26274
+ }
26275
+ parseParameter(str.length);
26276
+ return parameters;
26277
+ }
26183
26278
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
26184
26279
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
26185
26280
  if (utils$1.isFunction(filter)) {
@@ -26355,7 +26450,8 @@ var require_axios = __commonJS({
26355
26450
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
26356
26451
  }
26357
26452
  getSetCookie() {
26358
- return this.get("set-cookie") || [];
26453
+ const value = this.get("set-cookie");
26454
+ return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value];
26359
26455
  }
26360
26456
  get [Symbol.toStringTag]() {
26361
26457
  return "AxiosHeaders";
@@ -26363,6 +26459,9 @@ var require_axios = __commonJS({
26363
26459
  static from(thing) {
26364
26460
  return thing instanceof this ? thing : new this(thing);
26365
26461
  }
26462
+ static parseParameters(value) {
26463
+ return parseParameters(value);
26464
+ }
26366
26465
  static concat(first2, ...targets) {
26367
26466
  const computed = new this(first2);
26368
26467
  targets.forEach((target) => computed.set(target));
@@ -26450,9 +26549,30 @@ var require_axios = __commonJS({
26450
26549
  };
26451
26550
  return visit(config);
26452
26551
  }
26552
+ function stringifySafely$1(value) {
26553
+ try {
26554
+ return String(value);
26555
+ } catch (err) {
26556
+ return "";
26557
+ }
26558
+ }
26559
+ function aggregateErrorMessage(error) {
26560
+ const message = error.errors.map((entry) => {
26561
+ try {
26562
+ return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry);
26563
+ } catch (err) {
26564
+ return "";
26565
+ }
26566
+ }).filter(Boolean).join("; ");
26567
+ return message || error.name || "AggregateError";
26568
+ }
26453
26569
  var AxiosError = class _AxiosError extends Error {
26454
26570
  static from(error, code, config, request, response, customProps) {
26455
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
26571
+ let message = error.message;
26572
+ if (!message && utils$1.isArray(error.errors) && error.errors.length) {
26573
+ message = aggregateErrorMessage(error);
26574
+ }
26575
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
26456
26576
  Object.defineProperty(axiosError, "cause", {
26457
26577
  __proto__: null,
26458
26578
  value: error,
@@ -26536,6 +26656,14 @@ var require_axios = __commonJS({
26536
26656
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
26537
26657
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
26538
26658
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
26659
+ var PlatformBuffer = {
26660
+ isBufferAvailable() {
26661
+ return typeof Buffer !== "undefined";
26662
+ },
26663
+ from(value) {
26664
+ return Buffer.from(value);
26665
+ }
26666
+ };
26539
26667
  var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
26540
26668
  function isVisitable(thing) {
26541
26669
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
@@ -26594,8 +26722,8 @@ var require_axios = __commonJS({
26594
26722
  if (useBlob && typeof _Blob === "function") {
26595
26723
  return new _Blob([value]);
26596
26724
  }
26597
- if (typeof Buffer !== "undefined") {
26598
- return Buffer.from(value);
26725
+ if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {
26726
+ return PlatformBuffer.from(value);
26599
26727
  }
26600
26728
  throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
26601
26729
  }
@@ -26873,7 +27001,7 @@ var require_axios = __commonJS({
26873
27001
  }
26874
27002
  function parsePropPath(name) {
26875
27003
  const path2 = [];
26876
- const pattern = /\w+|\[(\w*)]/g;
27004
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
26877
27005
  let match2;
26878
27006
  while ((match2 = pattern.exec(name)) !== null) {
26879
27007
  throwIfDepthExceeded(path2.length);
@@ -27080,7 +27208,14 @@ var require_axios = __commonJS({
27080
27208
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
27081
27209
  }
27082
27210
  function combineURLs(baseURL, relativeURL) {
27083
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
27211
+ if (!relativeURL) {
27212
+ return baseURL;
27213
+ }
27214
+ let end = baseURL.length;
27215
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
27216
+ end--;
27217
+ }
27218
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
27084
27219
  }
27085
27220
  var malformedHttpProtocol = /^https?:(?!\/\/)/i;
27086
27221
  var httpProtocolControlCharacters = /[\t\n\r]/g;
@@ -27094,9 +27229,30 @@ var require_axios = __commonJS({
27094
27229
  function normalizeURLForProtocolCheck(url2) {
27095
27230
  return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
27096
27231
  }
27232
+ function redactFragment(fragment) {
27233
+ if (!fragment) {
27234
+ return fragment;
27235
+ }
27236
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match2, separator, parameterName = "") => {
27237
+ return `${separator}${parameterName}${REDACTED}`;
27238
+ });
27239
+ }
27240
+ function redactSensitiveURLParts(url2) {
27241
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
27242
+ const fragmentIndex = redactedURL.indexOf("#");
27243
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
27244
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(/([?&][^=&#]*=)[^&#]*/g, `$1${REDACTED}`);
27245
+ if (fragmentIndex === -1) {
27246
+ return redactedURLWithoutFragment;
27247
+ }
27248
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
27249
+ }
27097
27250
  function assertValidHttpProtocolURL(url2, config) {
27098
- if (typeof url2 === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url2))) {
27099
- throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config);
27251
+ if (typeof url2 === "string") {
27252
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
27253
+ if (malformedHttpProtocol.test(normalizedURL)) {
27254
+ throw new AxiosError(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, AxiosError.ERR_INVALID_URL, config);
27255
+ }
27100
27256
  }
27101
27257
  }
27102
27258
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
@@ -27173,7 +27329,7 @@ var require_axios = __commonJS({
27173
27329
  function getEnv(key) {
27174
27330
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
27175
27331
  }
27176
- var VERSION2 = "1.18.1";
27332
+ var VERSION2 = "1.19.0";
27177
27333
  function parseProtocol(url2) {
27178
27334
  const match2 = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
27179
27335
  return match2 && match2[1] || "";
@@ -27214,6 +27370,18 @@ var require_axios = __commonJS({
27214
27370
  }
27215
27371
  throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
27216
27372
  }
27373
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
27374
+ function setFormDataHeaders(headers, formHeaders, policy) {
27375
+ if (policy !== "content-only") {
27376
+ headers.set(formHeaders);
27377
+ return;
27378
+ }
27379
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
27380
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
27381
+ headers.set(key, val);
27382
+ }
27383
+ });
27384
+ }
27217
27385
  var kInternals = /* @__PURE__ */ Symbol("internals");
27218
27386
  var AxiosTransformStream = class extends stream.Transform {
27219
27387
  constructor(options) {
@@ -27532,6 +27700,60 @@ var require_axios = __commonJS({
27532
27700
  if (parts[0] !== "127") return false;
27533
27701
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
27534
27702
  };
27703
+ var parseIPv4Octet = (text) => {
27704
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
27705
+ const n = parseInt(text.slice(2), 16);
27706
+ return Number.isFinite(n) ? n : null;
27707
+ }
27708
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
27709
+ const n = parseInt(text, 8);
27710
+ return Number.isFinite(n) ? n : null;
27711
+ }
27712
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
27713
+ return null;
27714
+ }
27715
+ if (/^[0-9]+$/.test(text)) {
27716
+ const n = parseInt(text, 10);
27717
+ return Number.isFinite(n) ? n : null;
27718
+ }
27719
+ return null;
27720
+ };
27721
+ var normalizeIPAddress = (host) => {
27722
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
27723
+ return host;
27724
+ }
27725
+ let h = host;
27726
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
27727
+ h = h.slice(1, -1);
27728
+ }
27729
+ h = h.replace(/\.+$/, "");
27730
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
27731
+ const parts = h.split(".");
27732
+ if (parts.some((p) => p === "")) return host;
27733
+ if (parts.length === 4) {
27734
+ const octets = parts.map(parseIPv4Octet);
27735
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
27736
+ return octets.join(".");
27737
+ }
27738
+ if (parts.length > 4) {
27739
+ return host;
27740
+ }
27741
+ if (parts.length === 1) return host;
27742
+ const literalOctets = parts.slice(0, -1);
27743
+ const tail = parts[parts.length - 1];
27744
+ const tailSlots = 4 - literalOctets.length;
27745
+ const tailValue = parseIPv4Octet(tail);
27746
+ if (tailValue === null) return host;
27747
+ const maxTail = (1 << 8 * tailSlots) - 1;
27748
+ if (tailValue < 0 || tailValue > maxTail) return host;
27749
+ const tailOctets = new Array(tailSlots).fill(0);
27750
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
27751
+ tailOctets[i] = v & 255;
27752
+ }
27753
+ const literal2 = literalOctets.map(parseIPv4Octet);
27754
+ if (literal2.some((n) => n === null || n < 0 || n > 255)) return host;
27755
+ return [...literal2, ...tailOctets].join(".");
27756
+ };
27535
27757
  var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
27536
27758
  var isIPv6Unspecified = (host) => {
27537
27759
  if (host === "::") return true;
@@ -27623,7 +27845,12 @@ var require_axios = __commonJS({
27623
27845
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
27624
27846
  hostname = hostname.slice(1, -1);
27625
27847
  }
27626
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
27848
+ const trimmed = hostname.replace(/\.+$/, "");
27849
+ const ipv4 = normalizeIPAddress(trimmed);
27850
+ if (ipv4 !== trimmed) {
27851
+ return ipv4;
27852
+ }
27853
+ return unmapIPv4MappedIPv6(trimmed);
27627
27854
  };
27628
27855
  function shouldBypassProxy(location) {
27629
27856
  let parsed;
@@ -27645,6 +27872,9 @@ var require_axios = __commonJS({
27645
27872
  if (!entry) {
27646
27873
  return false;
27647
27874
  }
27875
+ if (entry === "*") {
27876
+ return true;
27877
+ }
27648
27878
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
27649
27879
  entryHost = normalizeNoProxyHost(entryHost);
27650
27880
  if (!entryHost) {
@@ -27736,7 +27966,7 @@ var require_axios = __commonJS({
27736
27966
  }
27737
27967
  const rawLoaded = e.loaded;
27738
27968
  const total = e.lengthComputable ? e.total : void 0;
27739
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
27969
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
27740
27970
  const progressBytes = Math.max(0, loaded - bytesNotified);
27741
27971
  const rate = _speedometer(progressBytes);
27742
27972
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -27762,10 +27992,64 @@ var require_axios = __commonJS({
27762
27992
  loaded
27763
27993
  }), throttled[1]];
27764
27994
  };
27765
- var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
27995
+ var asyncDecorator = (fn, scheduler = utils$1.asap) => (...args) => scheduler(() => fn(...args));
27766
27996
  var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
27767
27997
  var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
27768
- function estimateDataURLDecodedBytes(url2) {
27998
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
27999
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
28000
+ charCode >= 97 && charCode <= 122 || // a-z
28001
+ charCode >= 48 && charCode <= 57 || // 0-9
28002
+ charCode === 43 || // +
28003
+ charCode === 47 || // /
28004
+ charCode === 45 || // - (base64url)
28005
+ charCode === 95;
28006
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
28007
+ var base64Bytes = (significant) => {
28008
+ const groups = Math.floor(significant / 4);
28009
+ const remainder = significant % 4;
28010
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
28011
+ };
28012
+ var estimateBase64BufferAllocation = (body) => {
28013
+ const len = body.length;
28014
+ let padding = 0;
28015
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
28016
+ padding++;
28017
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
28018
+ padding++;
28019
+ }
28020
+ }
28021
+ return Math.floor((len - padding) * 3 / 4);
28022
+ };
28023
+ var estimatePercentDecodedBase64Bytes = (body) => {
28024
+ const len = body.length;
28025
+ let significant = 0;
28026
+ let padding = 0;
28027
+ let invalid = false;
28028
+ for (let i = 0; i < len; i++) {
28029
+ let code = body.charCodeAt(i);
28030
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
28031
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
28032
+ i += 2;
28033
+ }
28034
+ if (isBase64Whitespace(code)) {
28035
+ continue;
28036
+ }
28037
+ if (code === 61) {
28038
+ padding++;
28039
+ continue;
28040
+ }
28041
+ if (!isBase64Char(code) || padding > 0) {
28042
+ invalid = true;
28043
+ continue;
28044
+ }
28045
+ significant++;
28046
+ }
28047
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
28048
+ return estimateBase64BufferAllocation(body);
28049
+ }
28050
+ return base64Bytes(significant);
28051
+ };
28052
+ var estimateDataURLBytes = (url2, estimateBase64) => {
27769
28053
  if (!url2 || typeof url2 !== "string") return 0;
27770
28054
  if (!url2.startsWith("data:")) return 0;
27771
28055
  const comma = url2.indexOf(",");
@@ -27774,43 +28058,7 @@ var require_axios = __commonJS({
27774
28058
  const body = url2.slice(comma + 1);
27775
28059
  const isBase64 = /;base64/i.test(meta);
27776
28060
  if (isBase64) {
27777
- let effectiveLen = body.length;
27778
- const len = body.length;
27779
- for (let i = 0; i < len; i++) {
27780
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
27781
- const a = body.charCodeAt(i + 1);
27782
- const b = body.charCodeAt(i + 2);
27783
- const isHex = isHexDigit(a) && isHexDigit(b);
27784
- if (isHex) {
27785
- effectiveLen -= 2;
27786
- i += 2;
27787
- }
27788
- }
27789
- }
27790
- let pad3 = 0;
27791
- let idx = len - 1;
27792
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
27793
- body.charCodeAt(j - 1) === 51 && // '3'
27794
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
27795
- if (idx >= 0) {
27796
- if (body.charCodeAt(idx) === 61) {
27797
- pad3++;
27798
- idx--;
27799
- } else if (tailIsPct3D(idx)) {
27800
- pad3++;
27801
- idx -= 3;
27802
- }
27803
- }
27804
- if (pad3 === 1 && idx >= 0) {
27805
- if (body.charCodeAt(idx) === 61) {
27806
- pad3++;
27807
- } else if (tailIsPct3D(idx)) {
27808
- pad3++;
27809
- }
27810
- }
27811
- const groups = Math.floor(effectiveLen / 4);
27812
- const bytes2 = groups * 3 - (pad3 || 0);
27813
- return bytes2 > 0 ? bytes2 : 0;
28061
+ return estimateBase64(body);
27814
28062
  }
27815
28063
  let bytes = 0;
27816
28064
  for (let i = 0, len = body.length; i < len; i++) {
@@ -27835,6 +28083,13 @@ var require_axios = __commonJS({
27835
28083
  }
27836
28084
  }
27837
28085
  return bytes;
28086
+ };
28087
+ function estimateDataURLDecodedBytes(url2) {
28088
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
28089
+ return estimateDataURLBytes(fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes);
28090
+ }
28091
+ function estimateDataURLBufferAllocation(url2) {
28092
+ return estimateDataURLBytes(url2, estimateBase64BufferAllocation);
27838
28093
  }
27839
28094
  var zlibOptions = {
27840
28095
  flush: zlib.constants.Z_SYNC_FLUSH,
@@ -27852,23 +28107,12 @@ var require_axios = __commonJS({
27852
28107
  var isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
27853
28108
  var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
27854
28109
  var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
28110
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils$1.asap;
27855
28111
  var {
27856
28112
  http: httpFollow,
27857
28113
  https: httpsFollow
27858
28114
  } = followRedirects;
27859
28115
  var isHttps = /https:?/;
27860
- var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
27861
- function setFormDataHeaders$1(headers, formHeaders, policy) {
27862
- if (policy !== "content-only") {
27863
- headers.set(formHeaders);
27864
- return;
27865
- }
27866
- Object.entries(formHeaders).forEach(([key, val]) => {
27867
- if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
27868
- headers.set(key, val);
27869
- }
27870
- });
27871
- }
27872
28116
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
27873
28117
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
27874
28118
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
@@ -28259,7 +28503,7 @@ var require_axios = __commonJS({
28259
28503
  if (protocol === "data:") {
28260
28504
  if (maxContentLength > -1) {
28261
28505
  const dataUrl = String(own2("url") || fullPath || "");
28262
- const estimated = estimateDataURLDecodedBytes(dataUrl);
28506
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
28263
28507
  if (estimated > maxContentLength) {
28264
28508
  return reject(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
28265
28509
  }
@@ -28317,7 +28561,7 @@ var require_axios = __commonJS({
28317
28561
  boundary: userBoundary && userBoundary[1] || void 0
28318
28562
  });
28319
28563
  } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
28320
- setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
28564
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
28321
28565
  if (!headers.hasContentLength()) {
28322
28566
  try {
28323
28567
  const knownLength = await util.promisify(data.getLength).call(data);
@@ -28359,7 +28603,7 @@ var require_axios = __commonJS({
28359
28603
  data = stream.pipeline([data, new AxiosTransformStream({
28360
28604
  maxRate: utils$1.toFiniteNumber(maxUploadRate)
28361
28605
  })], utils$1.noop);
28362
- onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
28606
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3))));
28363
28607
  }
28364
28608
  let auth = void 0;
28365
28609
  const configAuth = own2("auth");
@@ -28496,7 +28740,7 @@ var require_axios = __commonJS({
28496
28740
  const transformStream = new AxiosTransformStream({
28497
28741
  maxRate: utils$1.toFiniteNumber(maxDownloadRate)
28498
28742
  });
28499
- onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
28743
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress, scheduleProgress), true, 3))));
28500
28744
  streams.push(transformStream);
28501
28745
  }
28502
28746
  let responseStream = res;
@@ -28762,6 +29006,12 @@ var require_axios = __commonJS({
28762
29006
  var headersToObject = (thing) => thing instanceof AxiosHeaders ? {
28763
29007
  ...thing
28764
29008
  } : thing;
29009
+ var ownEnumerableKeys = (thing) => {
29010
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
29011
+ return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter((symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable));
29012
+ }
29013
+ return Object.keys(thing);
29014
+ };
28765
29015
  function mergeConfig(config1, config2) {
28766
29016
  config1 = config1 || {};
28767
29017
  config2 = config2 || {};
@@ -28862,7 +29112,7 @@ var require_axios = __commonJS({
28862
29112
  validateStatus: mergeDirectKeys,
28863
29113
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
28864
29114
  };
28865
- utils$1.forEach(Object.keys({
29115
+ utils$1.forEach(ownEnumerableKeys({
28866
29116
  ...config1,
28867
29117
  ...config2
28868
29118
  }), function computeConfigValue(prop) {
@@ -28882,18 +29132,6 @@ var require_axios = __commonJS({
28882
29132
  }
28883
29133
  return config;
28884
29134
  }
28885
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
28886
- function setFormDataHeaders(headers, formHeaders, policy) {
28887
- if (policy !== "content-only") {
28888
- headers.set(formHeaders);
28889
- return;
28890
- }
28891
- Object.entries(formHeaders || {}).forEach(([key, val]) => {
28892
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
28893
- headers.set(key, val);
28894
- }
28895
- });
28896
- }
28897
29135
  var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
28898
29136
  function resolveConfig(config) {
28899
29137
  const newConfig = mergeConfig({}, config);
@@ -29099,9 +29337,18 @@ var require_axios = __commonJS({
29099
29337
  });
29100
29338
  signals = null;
29101
29339
  };
29102
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort, {
29103
- once: true
29104
- }));
29340
+ signals.forEach((signal2) => {
29341
+ if (aborted) {
29342
+ return;
29343
+ }
29344
+ if (signal2.aborted) {
29345
+ onabort.call(signal2);
29346
+ return;
29347
+ }
29348
+ signal2.addEventListener("abort", onabort, {
29349
+ once: true
29350
+ });
29351
+ });
29105
29352
  const {
29106
29353
  signal
29107
29354
  } = controller;
@@ -29847,16 +30094,29 @@ var require_axios = __commonJS({
29847
30094
  const onFulfilled = requestInterceptorChain[i++];
29848
30095
  const onRejected = requestInterceptorChain[i++];
29849
30096
  try {
29850
- newConfig = onFulfilled(newConfig);
30097
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
29851
30098
  } catch (error) {
29852
- onRejected.call(this, error);
30099
+ if (!onRejected) {
30100
+ promise = Promise.reject(error);
30101
+ break;
30102
+ }
30103
+ try {
30104
+ const rejectedResult = onRejected.call(this, error);
30105
+ if (utils$1.isThenable(rejectedResult)) {
30106
+ promise = Promise.resolve(rejectedResult).then(() => dispatchRequest.call(this, newConfig));
30107
+ }
30108
+ } catch (rejectedError) {
30109
+ promise = Promise.reject(rejectedError);
30110
+ }
29853
30111
  break;
29854
30112
  }
29855
30113
  }
29856
- try {
29857
- promise = dispatchRequest.call(this, newConfig);
29858
- } catch (error) {
29859
- return Promise.reject(error);
30114
+ if (!promise) {
30115
+ try {
30116
+ promise = dispatchRequest.call(this, newConfig);
30117
+ } catch (error) {
30118
+ promise = Promise.reject(error);
30119
+ }
29860
30120
  }
29861
30121
  i = 0;
29862
30122
  len = responseInterceptorChain.length;
@@ -30065,6 +30325,7 @@ var require_axios = __commonJS({
30065
30325
  LoopDetected: 508,
30066
30326
  NotExtended: 510,
30067
30327
  NetworkAuthenticationRequired: 511,
30328
+ WebServerReturnsAnUnknownError: 520,
30068
30329
  WebServerIsDown: 521,
30069
30330
  ConnectionTimedOut: 522,
30070
30331
  OriginIsUnreachable: 523,
@@ -31535,7 +31796,7 @@ var VERSION;
31535
31796
  var init_version = __esm({
31536
31797
  "src/version.ts"() {
31537
31798
  "use strict";
31538
- VERSION = true ? "4.8.0" : "0.0.0-test";
31799
+ VERSION = true ? "4.9.0" : "0.0.0-test";
31539
31800
  }
31540
31801
  });
31541
31802
 
@@ -31950,7 +32211,7 @@ var init_base_language_model_strategy = __esm({
31950
32211
  * @internal
31951
32212
  */
31952
32213
  static COMMON_PARAM_MAPPINGS = [
31953
- { camelCaseKey: "maxTokens", optionKey: "maxOutputTokens", outputKey: "max_tokens" },
32214
+ { camelCaseKey: "maxTokens", optionKey: "maxOutputTokens", outputKey: "max_completion_tokens" },
31954
32215
  { camelCaseKey: "temperature", optionKey: "temperature", outputKey: "temperature" },
31955
32216
  { camelCaseKey: "topP", optionKey: "topP", outputKey: "top_p" },
31956
32217
  {
@@ -33427,6 +33688,6 @@ mime-types/index.js:
33427
33688
  *)
33428
33689
 
33429
33690
  axios/dist/node/axios.cjs:
33430
- (*! Axios v1.18.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
33691
+ (*! Axios v1.19.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
33431
33692
  */
33432
33693
  //# sourceMappingURL=index-v2.cjs.map