@mastra/core 1.20.0-alpha.0 → 1.20.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 (102) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/{chunk-VXFKAXPG.cjs → chunk-2QO3IQWR.cjs} +75 -75
  5. package/dist/{chunk-VXFKAXPG.cjs.map → chunk-2QO3IQWR.cjs.map} +1 -1
  6. package/dist/{chunk-UH3RKNFA.cjs → chunk-53NCHPV5.cjs} +7 -7
  7. package/dist/{chunk-UH3RKNFA.cjs.map → chunk-53NCHPV5.cjs.map} +1 -1
  8. package/dist/{chunk-FSCEKOV2.js → chunk-5PAHRQLU.js} +4 -4
  9. package/dist/{chunk-FSCEKOV2.js.map → chunk-5PAHRQLU.js.map} +1 -1
  10. package/dist/{chunk-EUACZBJQ.js → chunk-7JKIBZI7.js} +4 -4
  11. package/dist/{chunk-EUACZBJQ.js.map → chunk-7JKIBZI7.js.map} +1 -1
  12. package/dist/{chunk-JWPGGVYM.js → chunk-7PYYVPF5.js} +3 -3
  13. package/dist/{chunk-JWPGGVYM.js.map → chunk-7PYYVPF5.js.map} +1 -1
  14. package/dist/{chunk-4D5OKNI6.js → chunk-7URCVA7N.js} +8 -8
  15. package/dist/{chunk-4D5OKNI6.js.map → chunk-7URCVA7N.js.map} +1 -1
  16. package/dist/{chunk-K6BGA6VT.cjs → chunk-BZW4PQNA.cjs} +5 -5
  17. package/dist/{chunk-K6BGA6VT.cjs.map → chunk-BZW4PQNA.cjs.map} +1 -1
  18. package/dist/{chunk-HVDHMRDP.cjs → chunk-CRGRF7QL.cjs} +5 -5
  19. package/dist/{chunk-HVDHMRDP.cjs.map → chunk-CRGRF7QL.cjs.map} +1 -1
  20. package/dist/{chunk-6PIICTDQ.js → chunk-CU6QKXLW.js} +3 -3
  21. package/dist/{chunk-6PIICTDQ.js.map → chunk-CU6QKXLW.js.map} +1 -1
  22. package/dist/{chunk-I6P4ZMZR.cjs → chunk-ED6CLXQI.cjs} +15 -15
  23. package/dist/{chunk-I6P4ZMZR.cjs.map → chunk-ED6CLXQI.cjs.map} +1 -1
  24. package/dist/{chunk-HVEPQYIA.cjs → chunk-GFRRPVRL.cjs} +185 -185
  25. package/dist/{chunk-HVEPQYIA.cjs.map → chunk-GFRRPVRL.cjs.map} +1 -1
  26. package/dist/{chunk-UKZAGP3S.js → chunk-HOAKFZ6P.js} +3 -3
  27. package/dist/{chunk-UKZAGP3S.js.map → chunk-HOAKFZ6P.js.map} +1 -1
  28. package/dist/{chunk-UXAM4V4V.cjs → chunk-HVVHMUI4.cjs} +6 -6
  29. package/dist/{chunk-UXAM4V4V.cjs.map → chunk-HVVHMUI4.cjs.map} +1 -1
  30. package/dist/{chunk-ML643Q3Q.cjs → chunk-J7AHOVB2.cjs} +12 -12
  31. package/dist/{chunk-ML643Q3Q.cjs.map → chunk-J7AHOVB2.cjs.map} +1 -1
  32. package/dist/{chunk-TZ6QKXAX.cjs → chunk-JBOVTCTQ.cjs} +48 -48
  33. package/dist/{chunk-TZ6QKXAX.cjs.map → chunk-JBOVTCTQ.cjs.map} +1 -1
  34. package/dist/{chunk-OBP4NK5A.js → chunk-MIWHSH7L.js} +3 -3
  35. package/dist/chunk-MIWHSH7L.js.map +1 -0
  36. package/dist/{chunk-Z6RH6FVZ.js → chunk-RB7WTRE2.js} +4 -4
  37. package/dist/{chunk-Z6RH6FVZ.js.map → chunk-RB7WTRE2.js.map} +1 -1
  38. package/dist/{chunk-FAHX46V5.cjs → chunk-RDHIVATT.cjs} +9 -9
  39. package/dist/{chunk-FAHX46V5.cjs.map → chunk-RDHIVATT.cjs.map} +1 -1
  40. package/dist/{chunk-Q3PALUCS.js → chunk-S3JFAGMH.js} +3 -3
  41. package/dist/{chunk-Q3PALUCS.js.map → chunk-S3JFAGMH.js.map} +1 -1
  42. package/dist/{chunk-HKUABNPR.cjs → chunk-T72NHA2O.cjs} +3 -3
  43. package/dist/chunk-T72NHA2O.cjs.map +1 -0
  44. package/dist/{chunk-RTAUE6GT.js → chunk-UCCVELTP.js} +6 -6
  45. package/dist/{chunk-RTAUE6GT.js.map → chunk-UCCVELTP.js.map} +1 -1
  46. package/dist/{chunk-KB7PLSUK.js → chunk-UFXC6VJW.js} +3 -3
  47. package/dist/{chunk-KB7PLSUK.js.map → chunk-UFXC6VJW.js.map} +1 -1
  48. package/dist/datasets/index.cjs +11 -11
  49. package/dist/datasets/index.js +1 -1
  50. package/dist/docs/SKILL.md +1 -1
  51. package/dist/docs/assets/SOURCE_MAP.json +121 -121
  52. package/dist/evals/index.cjs +5 -5
  53. package/dist/evals/index.js +2 -2
  54. package/dist/evals/scoreTraces/index.cjs +3 -3
  55. package/dist/evals/scoreTraces/index.js +1 -1
  56. package/dist/harness/index.cjs +7 -7
  57. package/dist/harness/index.js +5 -5
  58. package/dist/index.cjs +2 -2
  59. package/dist/index.js +1 -1
  60. package/dist/llm/index.cjs +16 -16
  61. package/dist/llm/index.js +5 -5
  62. package/dist/loop/index.cjs +14 -14
  63. package/dist/loop/index.js +1 -1
  64. package/dist/mastra/index.cjs +2 -2
  65. package/dist/mastra/index.js +1 -1
  66. package/dist/memory/index.cjs +14 -14
  67. package/dist/memory/index.js +1 -1
  68. package/dist/models-dev-TKKI7LVH.cjs +12 -0
  69. package/dist/{models-dev-OSJ3DXHK.cjs.map → models-dev-TKKI7LVH.cjs.map} +1 -1
  70. package/dist/models-dev-WTF6UG4D.js +3 -0
  71. package/dist/{models-dev-3P3IAKKM.js.map → models-dev-WTF6UG4D.js.map} +1 -1
  72. package/dist/netlify-QCPWAYI2.cjs +12 -0
  73. package/dist/{netlify-R4Q3C263.cjs.map → netlify-QCPWAYI2.cjs.map} +1 -1
  74. package/dist/netlify-V6N4TT4H.js +3 -0
  75. package/dist/{netlify-3WGJ3X2J.js.map → netlify-V6N4TT4H.js.map} +1 -1
  76. package/dist/processor-provider/index.cjs +10 -10
  77. package/dist/processor-provider/index.js +1 -1
  78. package/dist/processors/index.cjs +44 -44
  79. package/dist/processors/index.js +1 -1
  80. package/dist/provider-registry-34O53EL4.js +3 -0
  81. package/dist/{provider-registry-4HZEFIEW.js.map → provider-registry-34O53EL4.js.map} +1 -1
  82. package/dist/provider-registry-C54SHAP6.cjs +40 -0
  83. package/dist/{provider-registry-D5RMTQJP.cjs.map → provider-registry-C54SHAP6.cjs.map} +1 -1
  84. package/dist/relevance/index.cjs +3 -3
  85. package/dist/relevance/index.js +1 -1
  86. package/dist/stream/index.cjs +8 -8
  87. package/dist/stream/index.js +1 -1
  88. package/dist/tool-loop-agent/index.cjs +4 -4
  89. package/dist/tool-loop-agent/index.js +1 -1
  90. package/dist/workflows/evented/index.cjs +10 -10
  91. package/dist/workflows/evented/index.js +1 -1
  92. package/dist/workflows/index.cjs +24 -24
  93. package/dist/workflows/index.js +1 -1
  94. package/package.json +9 -9
  95. package/dist/chunk-HKUABNPR.cjs.map +0 -1
  96. package/dist/chunk-OBP4NK5A.js.map +0 -1
  97. package/dist/models-dev-3P3IAKKM.js +0 -3
  98. package/dist/models-dev-OSJ3DXHK.cjs +0 -12
  99. package/dist/netlify-3WGJ3X2J.js +0 -3
  100. package/dist/netlify-R4Q3C263.cjs +0 -12
  101. package/dist/provider-registry-4HZEFIEW.js +0 -3
  102. package/dist/provider-registry-D5RMTQJP.cjs +0 -40
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 1.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added DualLogger that transparently forwards all infrastructure logger calls (debug, info, warn, error, trackException) to the observability system (loggerVNext). This means all internal Mastra logs now automatically appear in your observability storage (e.g. DuckDB) without any code changes. ([#14899](https://github.com/mastra-ai/mastra/pull/14899))
8
+
9
+ **trackException** now extracts structured error data (errorId, domain, category, details, cause) and forwards it as an error-level log to observability storage, so exceptions are queryable alongside regular logs.
10
+
11
+ Added `logging` config option to ObservabilityInstance for controlling which logs reach observability storage:
12
+
13
+ ```ts
14
+ new Observability({
15
+ instance: new MastraObservability({
16
+ logging: {
17
+ enabled: true, // set to false to disable log forwarding
18
+ level: 'info', // minimum level: 'debug' | 'info' | 'warn' | 'error' | 'fatal'
19
+ },
20
+ }),
21
+ });
22
+ ```
23
+
24
+ - Add `registerExporter` method to the observability stack and Mastra class for runtime exporter registration ([#14730](https://github.com/mastra-ai/mastra/pull/14730))
25
+
26
+ ### Patch Changes
27
+
28
+ - Fixed Anthropic API rejection of empty user text content blocks. ([#14906](https://github.com/mastra-ai/mastra/pull/14906))
29
+
30
+ User messages containing only empty text parts (e.g., `{ type: 'text', text: '' }`) are now filtered out before being sent to the LLM. This prevents the "text content blocks must be non-empty" error that could occur when corrupted messages existed in the database.
31
+
32
+ Note: The root cause of how these empty user messages get persisted is still under investigation.
33
+
34
+ - Improved the `pattern` field description in the `list_files` workspace tool to prevent AI models from passing `"*"` when they intend to match all files. The description now clarifies that omitting `pattern` lists all files, that `*` only matches within a single directory level (standard glob), and that glob patterns only filter files while directories are always shown. ([#14897](https://github.com/mastra-ai/mastra/pull/14897))
35
+
36
+ - Added a `lastMessageOnly` option to the LLM-backed moderation, language detection, prompt injection, PII, and system prompt scrubber processors so they can inspect only the newest message instead of re-checking the full conversation on every run. ([#14903](https://github.com/mastra-ai/mastra/pull/14903))
37
+
38
+ - Fixed providerMetadata (e.g. Gemini's thoughtSignature) being stripped from tool-call events when using the non-streaming (generate) code path ([#14900](https://github.com/mastra-ai/mastra/pull/14900))
39
+
40
+ - Standardized all logger calls across the codebase to use static string messages with structured data objects. Dynamic values are now passed as key-value pairs in the second argument instead of being interpolated into template literal strings. This improves log filterability and searchability in observability storage. ([#14899](https://github.com/mastra-ai/mastra/pull/14899))
41
+
42
+ Removed ~150 redundant or noisy log calls including duplicate error logging after trackException and verbose in-memory storage CRUD traces.
43
+
44
+ - Fixed duplicate OpenAI item ID errors when using web search. When OpenAI streams responses with web search citations, it interleaves source chunks with text, causing multiple message parts to share the same item ID. This resulted in 'Duplicate item found' errors on subsequent requests. The fix prevents text flushing on source chunks and merges any existing duplicate parts. ([#14908](https://github.com/mastra-ai/mastra/pull/14908))
45
+
3
46
  ## 1.20.0-alpha.0
4
47
 
5
48
  ### Minor Changes
@@ -1,37 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunkML643Q3Q_cjs = require('../chunk-ML643Q3Q.cjs');
3
+ var chunkJ7AHOVB2_cjs = require('../chunk-J7AHOVB2.cjs');
4
4
  var chunkUWYGTSWV_cjs = require('../chunk-UWYGTSWV.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkML643Q3Q_cjs.Agent; }
10
+ get: function () { return chunkJ7AHOVB2_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "TripWire", {
13
13
  enumerable: true,
14
- get: function () { return chunkML643Q3Q_cjs.TripWire; }
14
+ get: function () { return chunkJ7AHOVB2_cjs.TripWire; }
15
15
  });
16
16
  Object.defineProperty(exports, "isSupportedLanguageModel", {
17
17
  enumerable: true,
18
- get: function () { return chunkML643Q3Q_cjs.isSupportedLanguageModel; }
18
+ get: function () { return chunkJ7AHOVB2_cjs.isSupportedLanguageModel; }
19
19
  });
20
20
  Object.defineProperty(exports, "resolveThreadIdFromArgs", {
21
21
  enumerable: true,
22
- get: function () { return chunkML643Q3Q_cjs.resolveThreadIdFromArgs; }
22
+ get: function () { return chunkJ7AHOVB2_cjs.resolveThreadIdFromArgs; }
23
23
  });
24
24
  Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
25
25
  enumerable: true,
26
- get: function () { return chunkML643Q3Q_cjs.supportedLanguageModelSpecifications; }
26
+ get: function () { return chunkJ7AHOVB2_cjs.supportedLanguageModelSpecifications; }
27
27
  });
28
28
  Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
29
29
  enumerable: true,
30
- get: function () { return chunkML643Q3Q_cjs.tryGenerateWithJsonFallback; }
30
+ get: function () { return chunkJ7AHOVB2_cjs.tryGenerateWithJsonFallback; }
31
31
  });
32
32
  Object.defineProperty(exports, "tryStreamWithJsonFallback", {
33
33
  enumerable: true,
34
- get: function () { return chunkML643Q3Q_cjs.tryStreamWithJsonFallback; }
34
+ get: function () { return chunkJ7AHOVB2_cjs.tryStreamWithJsonFallback; }
35
35
  });
36
36
  Object.defineProperty(exports, "MessageList", {
37
37
  enumerable: true,
@@ -1,4 +1,4 @@
1
- export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-UKZAGP3S.js';
1
+ export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-HOAKFZ6P.js';
2
2
  export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-NRA3BO5W.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkHVEPQYIA_cjs = require('./chunk-HVEPQYIA.cjs');
4
- var chunkFAHX46V5_cjs = require('./chunk-FAHX46V5.cjs');
5
- var chunkHKUABNPR_cjs = require('./chunk-HKUABNPR.cjs');
6
- var chunkK6BGA6VT_cjs = require('./chunk-K6BGA6VT.cjs');
3
+ var chunkGFRRPVRL_cjs = require('./chunk-GFRRPVRL.cjs');
4
+ var chunkRDHIVATT_cjs = require('./chunk-RDHIVATT.cjs');
5
+ var chunkT72NHA2O_cjs = require('./chunk-T72NHA2O.cjs');
6
+ var chunkBZW4PQNA_cjs = require('./chunk-BZW4PQNA.cjs');
7
7
  var chunkYEQJIM5W_cjs = require('./chunk-YEQJIM5W.cjs');
8
8
  var chunkKAJMVPYP_cjs = require('./chunk-KAJMVPYP.cjs');
9
9
  var chunk5WBEMKE2_cjs = require('./chunk-5WBEMKE2.cjs');
@@ -105,7 +105,7 @@ chunkBVWXTWXP_cjs.__export(dist_exports, {
105
105
  DEFAULT_MAX_DOWNLOAD_SIZE: () => DEFAULT_MAX_DOWNLOAD_SIZE,
106
106
  DelayedPromise: () => DelayedPromise,
107
107
  DownloadError: () => DownloadError,
108
- EventSourceParserStream: () => chunkHKUABNPR_cjs.EventSourceParserStream,
108
+ EventSourceParserStream: () => chunkT72NHA2O_cjs.EventSourceParserStream,
109
109
  VERSION: () => VERSION,
110
110
  asSchema: () => asSchema,
111
111
  asValidator: () => asValidator,
@@ -291,7 +291,7 @@ var marker = `vercel.ai.error.${name}`;
291
291
  var symbol = Symbol.for(marker);
292
292
  var _a;
293
293
  var _b;
294
- var DownloadError = class extends (_b = chunkHKUABNPR_cjs.AISDKError, _a = symbol, _b) {
294
+ var DownloadError = class extends (_b = chunkT72NHA2O_cjs.AISDKError, _a = symbol, _b) {
295
295
  constructor({
296
296
  url,
297
297
  statusCode,
@@ -306,7 +306,7 @@ var DownloadError = class extends (_b = chunkHKUABNPR_cjs.AISDKError, _a = symbo
306
306
  this.statusText = statusText;
307
307
  }
308
308
  static isInstance(error) {
309
- return chunkHKUABNPR_cjs.AISDKError.hasMarker(error, marker);
309
+ return chunkT72NHA2O_cjs.AISDKError.hasMarker(error, marker);
310
310
  }
311
311
  };
312
312
  var DEFAULT_MAX_DOWNLOAD_SIZE = 2 * 1024 * 1024 * 1024;
@@ -380,7 +380,7 @@ var createIdGenerator = ({
380
380
  return generator;
381
381
  }
382
382
  if (alphabet.includes(separator)) {
383
- throw new chunkHKUABNPR_cjs.InvalidArgumentError({
383
+ throw new chunkT72NHA2O_cjs.InvalidArgumentError({
384
384
  argument: "separator",
385
385
  message: `The separator "${separator}" must not be part of the alphabet "${alphabet}".`
386
386
  });
@@ -416,7 +416,7 @@ function handleFetchError({
416
416
  if (error instanceof TypeError && FETCH_FAILED_ERROR_MESSAGES.includes(error.message.toLowerCase())) {
417
417
  const cause = error.cause;
418
418
  if (cause != null) {
419
- return new chunkHKUABNPR_cjs.APICallError({
419
+ return new chunkT72NHA2O_cjs.APICallError({
420
420
  message: `Cannot connect to API: ${cause.message}`,
421
421
  cause,
422
422
  url,
@@ -504,10 +504,10 @@ var getFromApi = async ({
504
504
  requestBodyValues: {}
505
505
  });
506
506
  } catch (error) {
507
- if (isAbortError(error) || chunkHKUABNPR_cjs.APICallError.isInstance(error)) {
507
+ if (isAbortError(error) || chunkT72NHA2O_cjs.APICallError.isInstance(error)) {
508
508
  throw error;
509
509
  }
510
- throw new chunkHKUABNPR_cjs.APICallError({
510
+ throw new chunkT72NHA2O_cjs.APICallError({
511
511
  message: "Failed to process error response",
512
512
  cause: error,
513
513
  statusCode: response.status,
@@ -526,11 +526,11 @@ var getFromApi = async ({
526
526
  });
527
527
  } catch (error) {
528
528
  if (error instanceof Error) {
529
- if (isAbortError(error) || chunkHKUABNPR_cjs.APICallError.isInstance(error)) {
529
+ if (isAbortError(error) || chunkT72NHA2O_cjs.APICallError.isInstance(error)) {
530
530
  throw error;
531
531
  }
532
532
  }
533
- throw new chunkHKUABNPR_cjs.APICallError({
533
+ throw new chunkT72NHA2O_cjs.APICallError({
534
534
  message: "Failed to process successful response",
535
535
  cause: error,
536
536
  statusCode: response.status,
@@ -602,23 +602,23 @@ function loadApiKey({
602
602
  return apiKey;
603
603
  }
604
604
  if (apiKey != null) {
605
- throw new chunkHKUABNPR_cjs.LoadAPIKeyError({
605
+ throw new chunkT72NHA2O_cjs.LoadAPIKeyError({
606
606
  message: `${description} API key must be a string.`
607
607
  });
608
608
  }
609
609
  if (typeof process === "undefined") {
610
- throw new chunkHKUABNPR_cjs.LoadAPIKeyError({
610
+ throw new chunkT72NHA2O_cjs.LoadAPIKeyError({
611
611
  message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables is not supported in this environment.`
612
612
  });
613
613
  }
614
614
  apiKey = process.env[environmentVariableName];
615
615
  if (apiKey == null) {
616
- throw new chunkHKUABNPR_cjs.LoadAPIKeyError({
616
+ throw new chunkT72NHA2O_cjs.LoadAPIKeyError({
617
617
  message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter or the ${environmentVariableName} environment variable.`
618
618
  });
619
619
  }
620
620
  if (typeof apiKey !== "string") {
621
- throw new chunkHKUABNPR_cjs.LoadAPIKeyError({
621
+ throw new chunkT72NHA2O_cjs.LoadAPIKeyError({
622
622
  message: `${description} API key must be a string. The value of the ${environmentVariableName} environment variable is not a string.`
623
623
  });
624
624
  }
@@ -650,23 +650,23 @@ function loadSetting({
650
650
  return settingValue;
651
651
  }
652
652
  if (settingValue != null) {
653
- throw new chunkHKUABNPR_cjs.LoadSettingError({
653
+ throw new chunkT72NHA2O_cjs.LoadSettingError({
654
654
  message: `${description} setting must be a string.`
655
655
  });
656
656
  }
657
657
  if (typeof process === "undefined") {
658
- throw new chunkHKUABNPR_cjs.LoadSettingError({
658
+ throw new chunkT72NHA2O_cjs.LoadSettingError({
659
659
  message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables is not supported in this environment.`
660
660
  });
661
661
  }
662
662
  settingValue = process.env[environmentVariableName];
663
663
  if (settingValue == null) {
664
- throw new chunkHKUABNPR_cjs.LoadSettingError({
664
+ throw new chunkT72NHA2O_cjs.LoadSettingError({
665
665
  message: `${description} setting is missing. Pass it using the '${settingName}' parameter or the ${environmentVariableName} environment variable.`
666
666
  });
667
667
  }
668
668
  if (typeof settingValue !== "string") {
669
- throw new chunkHKUABNPR_cjs.LoadSettingError({
669
+ throw new chunkT72NHA2O_cjs.LoadSettingError({
670
670
  message: `${description} setting must be a string. The value of the ${environmentVariableName} environment variable is not a string.`
671
671
  });
672
672
  }
@@ -754,7 +754,7 @@ function standardSchemaValidator(standardSchema) {
754
754
  const result = await standardSchema["~standard"].validate(value);
755
755
  return result.issues == null ? { success: true, value: result.value } : {
756
756
  success: false,
757
- error: new chunkHKUABNPR_cjs.TypeValidationError({
757
+ error: new chunkT72NHA2O_cjs.TypeValidationError({
758
758
  value,
759
759
  cause: result.issues
760
760
  })
@@ -767,7 +767,7 @@ async function validateTypes({
767
767
  }) {
768
768
  const result = await safeValidateTypes({ value, schema });
769
769
  if (!result.success) {
770
- throw chunkHKUABNPR_cjs.TypeValidationError.wrap({ value, cause: result.error });
770
+ throw chunkT72NHA2O_cjs.TypeValidationError.wrap({ value, cause: result.error });
771
771
  }
772
772
  return result.value;
773
773
  }
@@ -786,13 +786,13 @@ async function safeValidateTypes({
786
786
  }
787
787
  return {
788
788
  success: false,
789
- error: chunkHKUABNPR_cjs.TypeValidationError.wrap({ value, cause: result.error }),
789
+ error: chunkT72NHA2O_cjs.TypeValidationError.wrap({ value, cause: result.error }),
790
790
  rawValue: value
791
791
  };
792
792
  } catch (error) {
793
793
  return {
794
794
  success: false,
795
- error: chunkHKUABNPR_cjs.TypeValidationError.wrap({ value, cause: error }),
795
+ error: chunkT72NHA2O_cjs.TypeValidationError.wrap({ value, cause: error }),
796
796
  rawValue: value
797
797
  };
798
798
  }
@@ -808,10 +808,10 @@ async function parseJSON({
808
808
  }
809
809
  return validateTypes({ value, schema });
810
810
  } catch (error) {
811
- if (chunkHKUABNPR_cjs.JSONParseError.isInstance(error) || chunkHKUABNPR_cjs.TypeValidationError.isInstance(error)) {
811
+ if (chunkT72NHA2O_cjs.JSONParseError.isInstance(error) || chunkT72NHA2O_cjs.TypeValidationError.isInstance(error)) {
812
812
  throw error;
813
813
  }
814
- throw new chunkHKUABNPR_cjs.JSONParseError({ text, cause: error });
814
+ throw new chunkT72NHA2O_cjs.JSONParseError({ text, cause: error });
815
815
  }
816
816
  }
817
817
  async function safeParseJSON({
@@ -827,7 +827,7 @@ async function safeParseJSON({
827
827
  } catch (error) {
828
828
  return {
829
829
  success: false,
830
- error: chunkHKUABNPR_cjs.JSONParseError.isInstance(error) ? error : new chunkHKUABNPR_cjs.JSONParseError({ text, cause: error }),
830
+ error: chunkT72NHA2O_cjs.JSONParseError.isInstance(error) ? error : new chunkT72NHA2O_cjs.JSONParseError({ text, cause: error }),
831
831
  rawValue: void 0
832
832
  };
833
833
  }
@@ -844,7 +844,7 @@ function parseJsonEventStream({
844
844
  stream,
845
845
  schema
846
846
  }) {
847
- return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new chunkHKUABNPR_cjs.EventSourceParserStream()).pipeThrough(
847
+ return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new chunkT72NHA2O_cjs.EventSourceParserStream()).pipeThrough(
848
848
  new TransformStream({
849
849
  async transform({ data }, controller) {
850
850
  if (data === "[DONE]") {
@@ -868,7 +868,7 @@ async function parseProviderOptions({
868
868
  schema
869
869
  });
870
870
  if (!parsedProviderOptions.success) {
871
- throw new chunkHKUABNPR_cjs.InvalidArgumentError({
871
+ throw new chunkT72NHA2O_cjs.InvalidArgumentError({
872
872
  argument: "providerOptions",
873
873
  message: `invalid ${provider} provider options`,
874
874
  cause: parsedProviderOptions.error
@@ -950,10 +950,10 @@ var postToApi = async ({
950
950
  requestBodyValues: body.values
951
951
  });
952
952
  } catch (error) {
953
- if (isAbortError(error) || chunkHKUABNPR_cjs.APICallError.isInstance(error)) {
953
+ if (isAbortError(error) || chunkT72NHA2O_cjs.APICallError.isInstance(error)) {
954
954
  throw error;
955
955
  }
956
- throw new chunkHKUABNPR_cjs.APICallError({
956
+ throw new chunkT72NHA2O_cjs.APICallError({
957
957
  message: "Failed to process error response",
958
958
  cause: error,
959
959
  statusCode: response.status,
@@ -972,11 +972,11 @@ var postToApi = async ({
972
972
  });
973
973
  } catch (error) {
974
974
  if (error instanceof Error) {
975
- if (isAbortError(error) || chunkHKUABNPR_cjs.APICallError.isInstance(error)) {
975
+ if (isAbortError(error) || chunkT72NHA2O_cjs.APICallError.isInstance(error)) {
976
976
  throw error;
977
977
  }
978
978
  }
979
- throw new chunkHKUABNPR_cjs.APICallError({
979
+ throw new chunkT72NHA2O_cjs.APICallError({
980
980
  message: "Failed to process successful response",
981
981
  cause: error,
982
982
  statusCode: response.status,
@@ -1070,7 +1070,7 @@ var createJsonErrorResponseHandler = ({
1070
1070
  if (responseBody.trim() === "") {
1071
1071
  return {
1072
1072
  responseHeaders,
1073
- value: new chunkHKUABNPR_cjs.APICallError({
1073
+ value: new chunkT72NHA2O_cjs.APICallError({
1074
1074
  message: response.statusText,
1075
1075
  url,
1076
1076
  requestBodyValues,
@@ -1088,7 +1088,7 @@ var createJsonErrorResponseHandler = ({
1088
1088
  });
1089
1089
  return {
1090
1090
  responseHeaders,
1091
- value: new chunkHKUABNPR_cjs.APICallError({
1091
+ value: new chunkT72NHA2O_cjs.APICallError({
1092
1092
  message: errorToMessage(parsedError),
1093
1093
  url,
1094
1094
  requestBodyValues,
@@ -1102,7 +1102,7 @@ var createJsonErrorResponseHandler = ({
1102
1102
  } catch (parseError) {
1103
1103
  return {
1104
1104
  responseHeaders,
1105
- value: new chunkHKUABNPR_cjs.APICallError({
1105
+ value: new chunkT72NHA2O_cjs.APICallError({
1106
1106
  message: response.statusText,
1107
1107
  url,
1108
1108
  requestBodyValues,
@@ -1117,7 +1117,7 @@ var createJsonErrorResponseHandler = ({
1117
1117
  var createEventSourceResponseHandler = (chunkSchema) => async ({ response }) => {
1118
1118
  const responseHeaders = extractResponseHeaders(response);
1119
1119
  if (response.body == null) {
1120
- throw new chunkHKUABNPR_cjs.EmptyResponseBodyError({});
1120
+ throw new chunkT72NHA2O_cjs.EmptyResponseBodyError({});
1121
1121
  }
1122
1122
  return {
1123
1123
  responseHeaders,
@@ -1130,7 +1130,7 @@ var createEventSourceResponseHandler = (chunkSchema) => async ({ response }) =>
1130
1130
  var createJsonStreamResponseHandler = (chunkSchema) => async ({ response }) => {
1131
1131
  const responseHeaders = extractResponseHeaders(response);
1132
1132
  if (response.body == null) {
1133
- throw new chunkHKUABNPR_cjs.EmptyResponseBodyError({});
1133
+ throw new chunkT72NHA2O_cjs.EmptyResponseBodyError({});
1134
1134
  }
1135
1135
  let buffer = "";
1136
1136
  return {
@@ -1162,7 +1162,7 @@ var createJsonResponseHandler = (responseSchema) => async ({ response, url, requ
1162
1162
  });
1163
1163
  const responseHeaders = extractResponseHeaders(response);
1164
1164
  if (!parsedResult.success) {
1165
- throw new chunkHKUABNPR_cjs.APICallError({
1165
+ throw new chunkT72NHA2O_cjs.APICallError({
1166
1166
  message: "Invalid JSON response",
1167
1167
  cause: parsedResult.error,
1168
1168
  statusCode: response.status,
@@ -1181,7 +1181,7 @@ var createJsonResponseHandler = (responseSchema) => async ({ response, url, requ
1181
1181
  var createBinaryResponseHandler = () => async ({ response, url, requestBodyValues }) => {
1182
1182
  const responseHeaders = extractResponseHeaders(response);
1183
1183
  if (!response.body) {
1184
- throw new chunkHKUABNPR_cjs.APICallError({
1184
+ throw new chunkT72NHA2O_cjs.APICallError({
1185
1185
  message: "Response body is empty",
1186
1186
  url,
1187
1187
  requestBodyValues,
@@ -1197,7 +1197,7 @@ var createBinaryResponseHandler = () => async ({ response, url, requestBodyValue
1197
1197
  value: new Uint8Array(buffer)
1198
1198
  };
1199
1199
  } catch (error) {
1200
- throw new chunkHKUABNPR_cjs.APICallError({
1200
+ throw new chunkT72NHA2O_cjs.APICallError({
1201
1201
  message: "Failed to read response as array buffer",
1202
1202
  url,
1203
1203
  requestBodyValues,
@@ -1213,7 +1213,7 @@ var createStatusCodeErrorResponseHandler = () => async ({ response, url, request
1213
1213
  const responseBody = await response.text();
1214
1214
  return {
1215
1215
  responseHeaders,
1216
- value: new chunkHKUABNPR_cjs.APICallError({
1216
+ value: new chunkT72NHA2O_cjs.APICallError({
1217
1217
  message: response.statusText,
1218
1218
  url,
1219
1219
  requestBodyValues,
@@ -2635,7 +2635,7 @@ function convertToOpenAIChatMessages({
2635
2635
  };
2636
2636
  } else if (part.mediaType.startsWith("audio/")) {
2637
2637
  if (part.data instanceof URL) {
2638
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
2638
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
2639
2639
  functionality: "audio file parts with URLs"
2640
2640
  });
2641
2641
  }
@@ -2660,14 +2660,14 @@ function convertToOpenAIChatMessages({
2660
2660
  };
2661
2661
  }
2662
2662
  default: {
2663
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
2663
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
2664
2664
  functionality: `audio content parts with media type ${part.mediaType}`
2665
2665
  });
2666
2666
  }
2667
2667
  }
2668
2668
  } else if (part.mediaType === "application/pdf") {
2669
2669
  if (part.data instanceof URL) {
2670
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
2670
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
2671
2671
  functionality: "PDF file parts with URLs"
2672
2672
  });
2673
2673
  }
@@ -2679,7 +2679,7 @@ function convertToOpenAIChatMessages({
2679
2679
  }
2680
2680
  };
2681
2681
  } else {
2682
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
2682
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
2683
2683
  functionality: `file part media type ${part.mediaType}`
2684
2684
  });
2685
2685
  }
@@ -3067,7 +3067,7 @@ function prepareChatTools({
3067
3067
  };
3068
3068
  default: {
3069
3069
  const _exhaustiveCheck = type;
3070
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
3070
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
3071
3071
  functionality: `tool choice type: ${_exhaustiveCheck}`
3072
3072
  });
3073
3073
  }
@@ -3459,19 +3459,19 @@ var OpenAIChatLanguageModel = class {
3459
3459
  const index = toolCallDelta.index;
3460
3460
  if (toolCalls[index] == null) {
3461
3461
  if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
3462
- throw new chunkHKUABNPR_cjs.InvalidResponseDataError({
3462
+ throw new chunkT72NHA2O_cjs.InvalidResponseDataError({
3463
3463
  data: toolCallDelta,
3464
3464
  message: `Expected 'function' type.`
3465
3465
  });
3466
3466
  }
3467
3467
  if (toolCallDelta.id == null) {
3468
- throw new chunkHKUABNPR_cjs.InvalidResponseDataError({
3468
+ throw new chunkT72NHA2O_cjs.InvalidResponseDataError({
3469
3469
  data: toolCallDelta,
3470
3470
  message: `Expected 'id' to be a string.`
3471
3471
  });
3472
3472
  }
3473
3473
  if (((_m = toolCallDelta.function) == null ? void 0 : _m.name) == null) {
3474
- throw new chunkHKUABNPR_cjs.InvalidResponseDataError({
3474
+ throw new chunkT72NHA2O_cjs.InvalidResponseDataError({
3475
3475
  data: toolCallDelta,
3476
3476
  message: `Expected 'function.name' to be a string.`
3477
3477
  });
@@ -3587,7 +3587,7 @@ function convertToOpenAICompletionPrompt({
3587
3587
  for (const { role, content } of prompt) {
3588
3588
  switch (role) {
3589
3589
  case "system": {
3590
- throw new chunkHKUABNPR_cjs.InvalidPromptError({
3590
+ throw new chunkT72NHA2O_cjs.InvalidPromptError({
3591
3591
  message: "Unexpected system message in prompt: ${content}",
3592
3592
  prompt
3593
3593
  });
@@ -3613,7 +3613,7 @@ ${userMessage}
3613
3613
  return part.text;
3614
3614
  }
3615
3615
  case "tool-call": {
3616
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
3616
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
3617
3617
  functionality: "tool-call messages"
3618
3618
  });
3619
3619
  }
@@ -3626,7 +3626,7 @@ ${assistantMessage}
3626
3626
  break;
3627
3627
  }
3628
3628
  case "tool": {
3629
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
3629
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
3630
3630
  functionality: "tool messages"
3631
3631
  });
3632
3632
  }
@@ -4039,7 +4039,7 @@ var OpenAIEmbeddingModel = class {
4039
4039
  }) {
4040
4040
  var _a2;
4041
4041
  if (values.length > this.maxEmbeddingsPerCall) {
4042
- throw new chunkHKUABNPR_cjs.TooManyEmbeddingValuesForCallError({
4042
+ throw new chunkT72NHA2O_cjs.TooManyEmbeddingValuesForCallError({
4043
4043
  provider: this.provider,
4044
4044
  modelId: this.modelId,
4045
4045
  maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,
@@ -4656,7 +4656,7 @@ async function convertToOpenAIResponsesInput({
4656
4656
  }
4657
4657
  };
4658
4658
  } else {
4659
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
4659
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
4660
4660
  functionality: `file part media type ${part.mediaType}`
4661
4661
  });
4662
4662
  }
@@ -5721,7 +5721,7 @@ async function prepareResponsesTools({
5721
5721
  };
5722
5722
  default: {
5723
5723
  const _exhaustiveCheck = type;
5724
- throw new chunkHKUABNPR_cjs.UnsupportedFunctionalityError({
5724
+ throw new chunkT72NHA2O_cjs.UnsupportedFunctionalityError({
5725
5725
  functionality: `tool choice type: ${_exhaustiveCheck}`
5726
5726
  });
5727
5727
  }
@@ -5979,7 +5979,7 @@ var OpenAIResponsesLanguageModel = class {
5979
5979
  fetch: this.config.fetch
5980
5980
  });
5981
5981
  if (response.error) {
5982
- throw new chunkHKUABNPR_cjs.APICallError({
5982
+ throw new chunkT72NHA2O_cjs.APICallError({
5983
5983
  message: response.error.message,
5984
5984
  url,
5985
5985
  requestBodyValues: body,
@@ -6922,7 +6922,7 @@ function createAzure(options = {}) {
6922
6922
  createAzure();
6923
6923
 
6924
6924
  // src/llm/model/gateways/azure.ts
6925
- var AzureOpenAIGateway = class extends chunkHKUABNPR_cjs.MastraModelGateway {
6925
+ var AzureOpenAIGateway = class extends chunkT72NHA2O_cjs.MastraModelGateway {
6926
6926
  constructor(config) {
6927
6927
  super();
6928
6928
  this.config = config;
@@ -7130,7 +7130,7 @@ var AzureOpenAIGateway = class extends chunkHKUABNPR_cjs.MastraModelGateway {
7130
7130
  apiKey,
7131
7131
  apiVersion,
7132
7132
  useDeploymentBasedUrls: true,
7133
- headers: { "User-Agent": chunkHKUABNPR_cjs.MASTRA_USER_AGENT, ...headers }
7133
+ headers: { "User-Agent": chunkT72NHA2O_cjs.MASTRA_USER_AGENT, ...headers }
7134
7134
  })(modelId);
7135
7135
  }
7136
7136
  };
@@ -7366,9 +7366,9 @@ function stableHeaderKey(headers) {
7366
7366
  return JSON.stringify(entries.sort(([a], [b]) => a.localeCompare(b)));
7367
7367
  }
7368
7368
  function getStaticProvidersByGateway(name2) {
7369
- return Object.fromEntries(Object.entries(chunkK6BGA6VT_cjs.PROVIDER_REGISTRY).filter(([_provider, config]) => config.gateway === name2));
7369
+ return Object.fromEntries(Object.entries(chunkBZW4PQNA_cjs.PROVIDER_REGISTRY).filter(([_provider, config]) => config.gateway === name2));
7370
7370
  }
7371
- var defaultGateways = [new chunkFAHX46V5_cjs.NetlifyGateway(), new chunkHVEPQYIA_cjs.ModelsDevGateway(getStaticProvidersByGateway(`models.dev`))];
7371
+ var defaultGateways = [new chunkRDHIVATT_cjs.NetlifyGateway(), new chunkGFRRPVRL_cjs.ModelsDevGateway(getStaticProvidersByGateway(`models.dev`))];
7372
7372
  var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7373
7373
  specificationVersion = "v2";
7374
7374
  defaultObjectGenerationMode = "json";
@@ -7413,7 +7413,7 @@ var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7413
7413
  };
7414
7414
  this.gateway = findGatewayForModel(normalizedConfig.id, [...customGateways || [], ...defaultGateways]);
7415
7415
  const gatewayPrefix = this.gateway.id === "models.dev" ? void 0 : this.gateway.id;
7416
- const parsed = chunkHVEPQYIA_cjs.parseModelRouterId(normalizedConfig.id, gatewayPrefix);
7416
+ const parsed = chunkGFRRPVRL_cjs.parseModelRouterId(normalizedConfig.id, gatewayPrefix);
7417
7417
  this.provider = parsed.providerId || "openai-compatible";
7418
7418
  if (parsed.providerId && parsed.modelId !== normalizedConfig.id) {
7419
7419
  parsedConfig.id = parsed.modelId;
@@ -7459,7 +7459,7 @@ var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7459
7459
  const model = await this.resolveLanguageModel({
7460
7460
  apiKey,
7461
7461
  headers: this.config.headers,
7462
- ...chunkHVEPQYIA_cjs.parseModelRouterId(this.config.routerId, gatewayPrefix)
7462
+ ...chunkGFRRPVRL_cjs.parseModelRouterId(this.config.routerId, gatewayPrefix)
7463
7463
  });
7464
7464
  const modelSupportedUrls = model.supportedUrls;
7465
7465
  if (!modelSupportedUrls) {
@@ -7523,7 +7523,7 @@ var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7523
7523
  const model = await this.resolveLanguageModel({
7524
7524
  apiKey,
7525
7525
  headers: this.config.headers,
7526
- ...chunkHVEPQYIA_cjs.parseModelRouterId(this.config.routerId, gatewayPrefix)
7526
+ ...chunkGFRRPVRL_cjs.parseModelRouterId(this.config.routerId, gatewayPrefix)
7527
7527
  });
7528
7528
  if (isLanguageModelV3(model)) {
7529
7529
  const aiSDKV6Model = new AISDKV6LanguageModel(model);
@@ -7563,7 +7563,7 @@ var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7563
7563
  headers: this.config.headers,
7564
7564
  transport: resolvedTransport,
7565
7565
  openaiWebSocket: websocket,
7566
- ...chunkHVEPQYIA_cjs.parseModelRouterId(this.config.routerId, gatewayPrefix)
7566
+ ...chunkGFRRPVRL_cjs.parseModelRouterId(this.config.routerId, gatewayPrefix)
7567
7567
  });
7568
7568
  if (isLanguageModelV3(model)) {
7569
7569
  const aiSDKV6Model = new AISDKV6LanguageModel(model);
@@ -7590,7 +7590,7 @@ var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7590
7590
  return _ModelRouterLanguageModel.modelInstances.get(key);
7591
7591
  }
7592
7592
  if (this.config.url) {
7593
- const modelInstance2 = chunkHKUABNPR_cjs.createOpenAICompatible({
7593
+ const modelInstance2 = chunkT72NHA2O_cjs.createOpenAICompatible({
7594
7594
  name: providerId,
7595
7595
  apiKey,
7596
7596
  baseURL: this.config.url,
@@ -7633,7 +7633,7 @@ var ModelRouterLanguageModel = class _ModelRouterLanguageModel {
7633
7633
  url: openaiWebSocket?.url,
7634
7634
  headers: openaiWebSocket?.headers
7635
7635
  });
7636
- const modelInstance = chunkHKUABNPR_cjs.createOpenAI({
7636
+ const modelInstance = chunkT72NHA2O_cjs.createOpenAI({
7637
7637
  apiKey,
7638
7638
  baseURL,
7639
7639
  headers,
@@ -7759,14 +7759,14 @@ var ModelRouterEmbeddingModel = class {
7759
7759
  this.modelId = normalizedConfig.modelId;
7760
7760
  if (normalizedConfig.url) {
7761
7761
  const apiKey = normalizedConfig.apiKey || "";
7762
- this.providerModel = chunkHKUABNPR_cjs.createOpenAICompatible({
7762
+ this.providerModel = chunkT72NHA2O_cjs.createOpenAICompatible({
7763
7763
  name: normalizedConfig.providerId,
7764
7764
  apiKey,
7765
7765
  baseURL: normalizedConfig.url,
7766
7766
  headers: normalizedConfig.headers
7767
7767
  }).textEmbeddingModel(normalizedConfig.modelId);
7768
7768
  } else {
7769
- const registry = chunkK6BGA6VT_cjs.GatewayRegistry.getInstance();
7769
+ const registry = chunkBZW4PQNA_cjs.GatewayRegistry.getInstance();
7770
7770
  const providerConfig = registry.getProviderConfig(normalizedConfig.providerId);
7771
7771
  if (!providerConfig) {
7772
7772
  throw new Error(`Unknown provider: ${normalizedConfig.providerId}`);
@@ -7788,18 +7788,18 @@ var ModelRouterEmbeddingModel = class {
7788
7788
  throw new Error(`API key not found for provider ${normalizedConfig.providerId}. Set ${envVarDisplay}`);
7789
7789
  }
7790
7790
  if (normalizedConfig.providerId === "openai") {
7791
- this.providerModel = chunkHKUABNPR_cjs.createOpenAI({ apiKey }).textEmbeddingModel(
7791
+ this.providerModel = chunkT72NHA2O_cjs.createOpenAI({ apiKey }).textEmbeddingModel(
7792
7792
  normalizedConfig.modelId
7793
7793
  );
7794
7794
  } else if (normalizedConfig.providerId === "google") {
7795
- this.providerModel = chunkHKUABNPR_cjs.createGoogleGenerativeAI({ apiKey }).textEmbedding(
7795
+ this.providerModel = chunkT72NHA2O_cjs.createGoogleGenerativeAI({ apiKey }).textEmbedding(
7796
7796
  normalizedConfig.modelId
7797
7797
  );
7798
7798
  } else {
7799
7799
  if (!providerConfig.url) {
7800
7800
  throw new Error(`Provider ${normalizedConfig.providerId} does not have a URL configured`);
7801
7801
  }
7802
- this.providerModel = chunkHKUABNPR_cjs.createOpenAICompatible({
7802
+ this.providerModel = chunkT72NHA2O_cjs.createOpenAICompatible({
7803
7803
  name: normalizedConfig.providerId,
7804
7804
  apiKey,
7805
7805
  baseURL: providerConfig.url
@@ -7825,5 +7825,5 @@ exports.EMBEDDING_MODELS = EMBEDDING_MODELS;
7825
7825
  exports.ModelRouterEmbeddingModel = ModelRouterEmbeddingModel;
7826
7826
  exports.ModelRouterLanguageModel = ModelRouterLanguageModel;
7827
7827
  exports.resolveModelConfig = resolveModelConfig;
7828
- //# sourceMappingURL=chunk-VXFKAXPG.cjs.map
7829
- //# sourceMappingURL=chunk-VXFKAXPG.cjs.map
7828
+ //# sourceMappingURL=chunk-2QO3IQWR.cjs.map
7829
+ //# sourceMappingURL=chunk-2QO3IQWR.cjs.map