@jerome-benoit/sap-ai-provider 4.4.16 → 4.4.18

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 (25) hide show
  1. package/dist/{chunk-ZTTUNOQ4.js → chunk-3M6NFVCS.js} +3 -3
  2. package/dist/{chunk-X3RVS75R.js → chunk-4CAVT2YC.js} +2 -2
  3. package/dist/{chunk-YWOWXJGS.js → chunk-BBWFNLML.js} +3 -3
  4. package/dist/{chunk-U5TGXMXL.js → chunk-O6ASHXPO.js} +21 -26
  5. package/dist/{chunk-U5TGXMXL.js.map → chunk-O6ASHXPO.js.map} +1 -1
  6. package/dist/{foundation-models-embedding-model-strategy-3AL3KDCE.js → foundation-models-embedding-model-strategy-XJV5REFR.js} +19 -18
  7. package/dist/foundation-models-embedding-model-strategy-XJV5REFR.js.map +1 -0
  8. package/dist/{foundation-models-language-model-strategy-X6RMOTAL.js → foundation-models-language-model-strategy-X6VNJZFG.js} +4 -4
  9. package/dist/index.cjs +41 -39
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +2 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +11 -5
  14. package/dist/index.js.map +1 -1
  15. package/dist/{orchestration-embedding-model-strategy-VCSK76HX.js → orchestration-embedding-model-strategy-3GIX5HAR.js} +4 -4
  16. package/dist/{orchestration-language-model-strategy-YFINEDMS.js → orchestration-language-model-strategy-GYBTFP2F.js} +4 -4
  17. package/dist/orchestration-language-model-strategy-GYBTFP2F.js.map +1 -0
  18. package/package.json +1 -1
  19. package/dist/foundation-models-embedding-model-strategy-3AL3KDCE.js.map +0 -1
  20. package/dist/orchestration-language-model-strategy-YFINEDMS.js.map +0 -1
  21. /package/dist/{chunk-ZTTUNOQ4.js.map → chunk-3M6NFVCS.js.map} +0 -0
  22. /package/dist/{chunk-X3RVS75R.js.map → chunk-4CAVT2YC.js.map} +0 -0
  23. /package/dist/{chunk-YWOWXJGS.js.map → chunk-BBWFNLML.js.map} +0 -0
  24. /package/dist/{foundation-models-language-model-strategy-X6RMOTAL.js.map → foundation-models-language-model-strategy-X6VNJZFG.js.map} +0 -0
  25. /package/dist/{orchestration-embedding-model-strategy-VCSK76HX.js.map → orchestration-embedding-model-strategy-3GIX5HAR.js.map} +0 -0
@@ -9,14 +9,14 @@ import {
9
9
  createAISDKRequestBodySummary,
10
10
  createStreamTransformer,
11
11
  mapToolChoice
12
- } from "./chunk-X3RVS75R.js";
12
+ } from "./chunk-4CAVT2YC.js";
13
13
  import {
14
14
  VERSION,
15
15
  convertToAISDKError,
16
16
  getProviderName,
17
17
  normalizeHeaders,
18
18
  sapAILanguageModelProviderOptions
19
- } from "./chunk-U5TGXMXL.js";
19
+ } from "./chunk-O6ASHXPO.js";
20
20
 
21
21
  // src/base-language-model-strategy.ts
22
22
  import { parseProviderOptions } from "@ai-sdk/provider-utils";
@@ -181,4 +181,4 @@ var BaseLanguageModelStrategy = class {
181
181
  export {
182
182
  BaseLanguageModelStrategy
183
183
  };
184
- //# sourceMappingURL=chunk-ZTTUNOQ4.js.map
184
+ //# sourceMappingURL=chunk-3M6NFVCS.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getProviderName,
5
5
  sapAIEmbeddingProviderOptions,
6
6
  validateModelParamsWithWarnings
7
- } from "./chunk-U5TGXMXL.js";
7
+ } from "./chunk-O6ASHXPO.js";
8
8
 
9
9
  // src/strategy-utils.ts
10
10
  import { TooManyEmbeddingValuesForCallError } from "@ai-sdk/provider";
@@ -633,4 +633,4 @@ export {
633
633
  normalizeEmbedding,
634
634
  prepareEmbeddingCall
635
635
  };
636
- //# sourceMappingURL=chunk-X3RVS75R.js.map
636
+ //# sourceMappingURL=chunk-4CAVT2YC.js.map
@@ -2,11 +2,11 @@ import {createRequire as __createRequire} from 'module';var require=__createRequ
2
2
  import {
3
3
  buildEmbeddingResult,
4
4
  prepareEmbeddingCall
5
- } from "./chunk-X3RVS75R.js";
5
+ } from "./chunk-4CAVT2YC.js";
6
6
  import {
7
7
  VERSION,
8
8
  convertToAISDKError
9
- } from "./chunk-U5TGXMXL.js";
9
+ } from "./chunk-O6ASHXPO.js";
10
10
 
11
11
  // src/base-embedding-model-strategy.ts
12
12
  var BaseEmbeddingModelStrategy = class {
@@ -51,4 +51,4 @@ var BaseEmbeddingModelStrategy = class {
51
51
  export {
52
52
  BaseEmbeddingModelStrategy
53
53
  };
54
- //# sourceMappingURL=chunk-YWOWXJGS.js.map
54
+ //# sourceMappingURL=chunk-BBWFNLML.js.map
@@ -30157,7 +30157,7 @@ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-serv
30157
30157
  return new NoSuchModelError({
30158
30158
  message: `SAP AI Core deployment error: ${originalErrorMsg}
30159
30159
 
30160
- Make sure you have a running orchestration deployment in your AI Core instance.
30160
+ Make sure you have a running orchestration deployment in your SAP AI Core instance.
30161
30161
  See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-orchestration`,
30162
30162
  modelId: modelId ?? "unknown",
30163
30163
  modelType: "languageModel"
@@ -30368,22 +30368,28 @@ function tryExtractSAPErrorFromMessage(message) {
30368
30368
  var DANGEROUS_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
30369
30369
  var MAX_DEPTH = 100;
30370
30370
  function deepMerge(...sources) {
30371
- return mergeInternal(sources);
30371
+ let result = {};
30372
+ for (const source of sources) {
30373
+ if (source == null) continue;
30374
+ result = mergeTwo(result, source, /* @__PURE__ */ new Set(), 0);
30375
+ }
30376
+ return result;
30372
30377
  }
30373
- function cloneDeep(obj, seen, depth) {
30378
+ function cloneDeep(obj, ancestors, depth) {
30374
30379
  if (depth > MAX_DEPTH) {
30375
30380
  throw new Error("Maximum merge depth exceeded");
30376
30381
  }
30377
- if (seen.has(obj)) {
30382
+ if (ancestors.has(obj)) {
30378
30383
  throw new Error("Circular reference detected during deep merge");
30379
30384
  }
30380
- seen.add(obj);
30385
+ ancestors.add(obj);
30381
30386
  const result = {};
30382
30387
  for (const key of Object.keys(obj)) {
30383
30388
  if (!isSafeKey(key)) continue;
30384
30389
  const value = obj[key];
30385
- result[key] = isPlainObject(value) ? cloneDeep(value, seen, depth + 1) : value;
30390
+ result[key] = isPlainObject(value) ? cloneDeep(value, ancestors, depth + 1) : value;
30386
30391
  }
30392
+ ancestors.delete(obj);
30387
30393
  return result;
30388
30394
  }
30389
30395
  function isPlainObject(value) {
@@ -30394,44 +30400,33 @@ function isPlainObject(value) {
30394
30400
  function isSafeKey(key) {
30395
30401
  return !DANGEROUS_KEYS.has(key);
30396
30402
  }
30397
- function mergeInternal(sources) {
30398
- let result = {};
30399
- for (const source of sources) {
30400
- if (source == null) continue;
30401
- result = mergeTwo(result, source, /* @__PURE__ */ new WeakSet(), 0);
30402
- }
30403
- return result;
30404
- }
30405
- function mergeTwo(target, source, seen, depth) {
30403
+ function mergeTwo(target, source, ancestors, depth) {
30406
30404
  if (depth > MAX_DEPTH) {
30407
30405
  throw new Error("Maximum merge depth exceeded");
30408
30406
  }
30409
- if (seen.has(source)) {
30407
+ if (ancestors.has(source)) {
30410
30408
  throw new Error("Circular reference detected during deep merge");
30411
30409
  }
30412
- seen.add(source);
30410
+ ancestors.add(source);
30413
30411
  for (const key of Object.keys(source)) {
30414
30412
  if (!isSafeKey(key)) continue;
30415
30413
  const sourceValue = source[key];
30416
30414
  const targetValue = target[key];
30417
30415
  if (isPlainObject(sourceValue) && isPlainObject(targetValue)) {
30418
- target[key] = mergeTwo(
30419
- cloneDeep(targetValue, /* @__PURE__ */ new WeakSet(), depth + 1),
30420
- sourceValue,
30421
- seen,
30422
- depth + 1
30423
- );
30416
+ const cloned = cloneDeep(targetValue, /* @__PURE__ */ new Set(), depth + 1);
30417
+ target[key] = mergeTwo(cloned, sourceValue, ancestors, depth + 1);
30424
30418
  } else if (isPlainObject(sourceValue)) {
30425
- target[key] = cloneDeep(sourceValue, seen, depth + 1);
30419
+ target[key] = cloneDeep(sourceValue, /* @__PURE__ */ new Set(), depth + 1);
30426
30420
  } else {
30427
30421
  target[key] = sourceValue;
30428
30422
  }
30429
30423
  }
30424
+ ancestors.delete(source);
30430
30425
  return target;
30431
30426
  }
30432
30427
 
30433
30428
  // src/version.ts
30434
- var VERSION = true ? "4.4.16" : "0.0.0-test";
30429
+ var VERSION = true ? "4.4.18" : "0.0.0-test";
30435
30430
 
30436
30431
  export {
30437
30432
  __toESM,
@@ -30484,4 +30479,4 @@ mime-types/index.js:
30484
30479
  axios/dist/node/axios.cjs:
30485
30480
  (*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors *)
30486
30481
  */
30487
- //# sourceMappingURL=chunk-U5TGXMXL.js.map
30482
+ //# sourceMappingURL=chunk-O6ASHXPO.js.map