@mastra/core 1.22.0-alpha.0 → 1.22.0-alpha.1
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/CHANGELOG.md +10 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-QF4KRWYU.cjs → chunk-2AARITCG.cjs} +30 -21
- package/dist/chunk-2AARITCG.cjs.map +1 -0
- package/dist/{chunk-46DASRFB.js → chunk-2NAF5HJR.js} +3 -3
- package/dist/{chunk-46DASRFB.js.map → chunk-2NAF5HJR.js.map} +1 -1
- package/dist/{chunk-NB435LXG.js → chunk-2SIZB5GD.js} +4 -4
- package/dist/{chunk-NB435LXG.js.map → chunk-2SIZB5GD.js.map} +1 -1
- package/dist/{chunk-U63DZ6E6.js → chunk-6ALBWWMT.js} +4 -4
- package/dist/{chunk-U63DZ6E6.js.map → chunk-6ALBWWMT.js.map} +1 -1
- package/dist/{chunk-3RAYTSPI.js → chunk-6MK2HL3B.js} +9 -9
- package/dist/{chunk-3RAYTSPI.js.map → chunk-6MK2HL3B.js.map} +1 -1
- package/dist/{chunk-WTV62NHE.cjs → chunk-73LGQD54.cjs} +9 -9
- package/dist/{chunk-WTV62NHE.cjs.map → chunk-73LGQD54.cjs.map} +1 -1
- package/dist/{chunk-BFOGUVFL.cjs → chunk-7TQPGNH7.cjs} +5 -5
- package/dist/{chunk-BFOGUVFL.cjs.map → chunk-7TQPGNH7.cjs.map} +1 -1
- package/dist/{chunk-M5PKEDYH.js → chunk-CKN3JVV3.js} +3 -3
- package/dist/{chunk-M5PKEDYH.js.map → chunk-CKN3JVV3.js.map} +1 -1
- package/dist/{chunk-PCDPQEYH.cjs → chunk-DIHV46DM.cjs} +7 -7
- package/dist/{chunk-PCDPQEYH.cjs.map → chunk-DIHV46DM.cjs.map} +1 -1
- package/dist/{chunk-B7PS7GR7.js → chunk-GQ5YBJK7.js} +8 -8
- package/dist/{chunk-B7PS7GR7.js.map → chunk-GQ5YBJK7.js.map} +1 -1
- package/dist/{chunk-JZBAUINL.cjs → chunk-I2O2QKDG.cjs} +77 -77
- package/dist/{chunk-JZBAUINL.cjs.map → chunk-I2O2QKDG.cjs.map} +1 -1
- package/dist/{chunk-DTQCQXSX.cjs → chunk-L3GI3EI5.cjs} +48 -48
- package/dist/{chunk-DTQCQXSX.cjs.map → chunk-L3GI3EI5.cjs.map} +1 -1
- package/dist/{chunk-O2FAC2JL.cjs → chunk-SH3TVIAI.cjs} +185 -185
- package/dist/{chunk-O2FAC2JL.cjs.map → chunk-SH3TVIAI.cjs.map} +1 -1
- package/dist/{chunk-PJRKKSYW.js → chunk-SVS5U4HA.js} +20 -11
- package/dist/chunk-SVS5U4HA.js.map +1 -0
- package/dist/{chunk-RZISMMDM.js → chunk-SYJJZDUK.js} +3 -3
- package/dist/{chunk-RZISMMDM.js.map → chunk-SYJJZDUK.js.map} +1 -1
- package/dist/{chunk-YYPOSWKA.cjs → chunk-VQP7UFAY.cjs} +17 -17
- package/dist/{chunk-YYPOSWKA.cjs.map → chunk-VQP7UFAY.cjs.map} +1 -1
- package/dist/{chunk-HVE6QR4G.cjs → chunk-WHNDWMDZ.cjs} +6 -6
- package/dist/{chunk-HVE6QR4G.cjs.map → chunk-WHNDWMDZ.cjs.map} +1 -1
- package/dist/{chunk-FHQY4G2O.cjs → chunk-WID3XI3A.cjs} +3 -3
- package/dist/{chunk-FHQY4G2O.cjs.map → chunk-WID3XI3A.cjs.map} +1 -1
- package/dist/{chunk-EFXVHFAI.js → chunk-X4HQ25SA.js} +3 -3
- package/dist/{chunk-EFXVHFAI.js.map → chunk-X4HQ25SA.js.map} +1 -1
- package/dist/{chunk-2G5U5LCK.cjs → chunk-XL636GZV.cjs} +20 -20
- package/dist/{chunk-2G5U5LCK.cjs.map → chunk-XL636GZV.cjs.map} +1 -1
- package/dist/{chunk-2VC36BDH.js → chunk-YAK4TBQR.js} +3 -3
- package/dist/{chunk-2VC36BDH.js.map → chunk-YAK4TBQR.js.map} +1 -1
- package/dist/{chunk-PBVPRLDI.js → chunk-YKBJTINY.js} +6 -6
- package/dist/{chunk-PBVPRLDI.js.map → chunk-YKBJTINY.js.map} +1 -1
- package/dist/datasets/index.cjs +11 -11
- package/dist/datasets/index.js +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +173 -173
- package/dist/evals/index.cjs +5 -5
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +7 -7
- package/dist/harness/index.js +5 -5
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-GY5HXMDW.js +3 -0
- package/dist/{mastra-2EQZYM7C.js.map → mastra-GY5HXMDW.js.map} +1 -1
- package/dist/mastra-UBBD2C4R.cjs +12 -0
- package/dist/{mastra-XPBVZO54.cjs.map → mastra-UBBD2C4R.cjs.map} +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-JXSMUEMX.js +3 -0
- package/dist/{models-dev-DA5OEOGQ.js.map → models-dev-JXSMUEMX.js.map} +1 -1
- package/dist/models-dev-TVW7HD3S.cjs +12 -0
- package/dist/{models-dev-HDA3INHC.cjs.map → models-dev-TVW7HD3S.cjs.map} +1 -1
- package/dist/netlify-AEHADB4C.cjs +12 -0
- package/dist/{netlify-6PWJPWSI.cjs.map → netlify-AEHADB4C.cjs.map} +1 -1
- package/dist/netlify-QVP7HF5L.js +3 -0
- package/dist/{netlify-EENUHCAW.js.map → netlify-QVP7HF5L.js.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +44 -44
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-DZ6XQUKC.cjs +40 -0
- package/dist/{provider-registry-VE7OCGGU.cjs.map → provider-registry-DZ6XQUKC.cjs.map} +1 -1
- package/dist/provider-registry-VKWSCXTI.js +3 -0
- package/dist/{provider-registry-TQS5D74S.js.map → provider-registry-VKWSCXTI.js.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/stream/aisdk/v5/transform.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/stream/types.d.ts +1 -0
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-PJRKKSYW.js.map +0 -1
- package/dist/chunk-QF4KRWYU.cjs.map +0 -1
- package/dist/mastra-2EQZYM7C.js +0 -3
- package/dist/mastra-XPBVZO54.cjs +0 -12
- package/dist/models-dev-DA5OEOGQ.js +0 -3
- package/dist/models-dev-HDA3INHC.cjs +0 -12
- package/dist/netlify-6PWJPWSI.cjs +0 -12
- package/dist/netlify-EENUHCAW.js +0 -3
- package/dist/provider-registry-TQS5D74S.js +0 -3
- package/dist/provider-registry-VE7OCGGU.cjs +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.22.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update provider registry and model documentation with latest models and providers ([`81e4259`](https://github.com/mastra-ai/mastra/commit/81e425939b4ceeb4f586e9b6d89c3b1c1f2d2fe7))
|
|
8
|
+
|
|
9
|
+
- **Fixed streamed finish metadata being dropped from final model results** ([#13914](https://github.com/mastra-ai/mastra/pull/13914))
|
|
10
|
+
|
|
11
|
+
Provider-specific metadata from streamed `finish` events is now preserved consistently across final output results, buffered steps, and `onFinish` callbacks. This improves compatibility with providers like Anthropic and Google/Gemini when they attach cache, reasoning, or other finish-time metadata during streaming.
|
|
12
|
+
|
|
3
13
|
## 1.22.0-alpha.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2AARITCG_cjs = require('../chunk-2AARITCG.cjs');
|
|
4
4
|
var chunkDOPULILR_cjs = require('../chunk-DOPULILR.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Agent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk2AARITCG_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk2AARITCG_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isSupportedLanguageModel", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk2AARITCG_cjs.isSupportedLanguageModel; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk2AARITCG_cjs.resolveThreadIdFromArgs; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk2AARITCG_cjs.supportedLanguageModelSpecifications; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk2AARITCG_cjs.tryGenerateWithJsonFallback; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk2AARITCG_cjs.tryStreamWithJsonFallback; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MessageList", {
|
|
37
37
|
enumerable: true,
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
1
|
+
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-SVS5U4HA.js';
|
|
2
2
|
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-MOVQYN2F.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,7 +8,7 @@ var chunkDOPULILR_cjs = require('./chunk-DOPULILR.cjs');
|
|
|
8
8
|
var chunkY3APFUXZ_cjs = require('./chunk-Y3APFUXZ.cjs');
|
|
9
9
|
var chunkCFMZZDO2_cjs = require('./chunk-CFMZZDO2.cjs');
|
|
10
10
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkI2O2QKDG_cjs = require('./chunk-I2O2QKDG.cjs');
|
|
12
12
|
var chunkTDTG2WDG_cjs = require('./chunk-TDTG2WDG.cjs');
|
|
13
13
|
var chunk22FSGATE_cjs = require('./chunk-22FSGATE.cjs');
|
|
14
14
|
var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
|
|
@@ -2077,7 +2077,7 @@ var ProcessorRunner = class _ProcessorRunner {
|
|
|
2077
2077
|
}
|
|
2078
2078
|
const { model: _model, ...rest } = result;
|
|
2079
2079
|
if (result.model) {
|
|
2080
|
-
const resolvedModel = await
|
|
2080
|
+
const resolvedModel = await chunkI2O2QKDG_cjs.resolveModelConfig(result.model);
|
|
2081
2081
|
const isSupported = isSupportedLanguageModel(resolvedModel);
|
|
2082
2082
|
if (!isSupported) {
|
|
2083
2083
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
@@ -3137,7 +3137,7 @@ var MastraModelOutput = class extends chunkC5WSRMJD_cjs.MastraBase {
|
|
|
3137
3137
|
// complicated to do this in this PR, it will require a much bigger change.
|
|
3138
3138
|
uiMessages: messageList.get.response.aiV5.ui()
|
|
3139
3139
|
},
|
|
3140
|
-
providerMetadata
|
|
3140
|
+
providerMetadata: providerMetadata ?? chunk.payload.providerMetadata
|
|
3141
3141
|
};
|
|
3142
3142
|
await options?.onStepFinish?.({
|
|
3143
3143
|
...self.#model.modelId && self.#model.provider && self.#model.version ? { model: self.#model } : {},
|
|
@@ -3216,6 +3216,7 @@ var MastraModelOutput = class extends chunkC5WSRMJD_cjs.MastraBase {
|
|
|
3216
3216
|
if (chunk.payload.stepResult.reason) {
|
|
3217
3217
|
self.#finishReason = chunk.payload.stepResult.reason;
|
|
3218
3218
|
}
|
|
3219
|
+
const finalProviderMetadata = chunk.payload.metadata?.providerMetadata ?? chunk.payload.providerMetadata;
|
|
3219
3220
|
if (chunk.payload.stepResult.reason === "tripwire") {
|
|
3220
3221
|
const outputSteps = chunk.payload.output?.steps;
|
|
3221
3222
|
const lastStep = outputSteps?.[outputSteps?.length - 1];
|
|
@@ -3333,10 +3334,14 @@ var MastraModelOutput = class extends chunkC5WSRMJD_cjs.MastraBase {
|
|
|
3333
3334
|
}
|
|
3334
3335
|
}
|
|
3335
3336
|
const reasoningText = self.#bufferedReasoning.length > 0 ? self.#bufferedReasoning.map((reasoningPart) => reasoningPart.payload.text).join("") : void 0;
|
|
3337
|
+
const baseFinishStep = self.#bufferedSteps[self.#bufferedSteps.length - 1];
|
|
3338
|
+
if (baseFinishStep && baseFinishStep.providerMetadata === void 0 && finalProviderMetadata !== void 0) {
|
|
3339
|
+
baseFinishStep.providerMetadata = finalProviderMetadata;
|
|
3340
|
+
}
|
|
3336
3341
|
this.resolvePromises({
|
|
3337
3342
|
usage: self.#usageCount,
|
|
3338
3343
|
warnings: self.#warnings,
|
|
3339
|
-
providerMetadata:
|
|
3344
|
+
providerMetadata: finalProviderMetadata,
|
|
3340
3345
|
response: { ...response, dbMessages: self.messageList.get.response.db() },
|
|
3341
3346
|
request: self.#request || {},
|
|
3342
3347
|
reasoningText,
|
|
@@ -3351,11 +3356,10 @@ var MastraModelOutput = class extends chunkC5WSRMJD_cjs.MastraBase {
|
|
|
3351
3356
|
suspendPayload: void 0,
|
|
3352
3357
|
resumeSchema: void 0
|
|
3353
3358
|
});
|
|
3354
|
-
const baseFinishStep = self.#bufferedSteps[self.#bufferedSteps.length - 1];
|
|
3355
3359
|
if (baseFinishStep) {
|
|
3356
3360
|
const onFinishPayload = {
|
|
3357
3361
|
// StepResult properties from baseFinishStep
|
|
3358
|
-
providerMetadata: baseFinishStep.providerMetadata,
|
|
3362
|
+
providerMetadata: baseFinishStep.providerMetadata ?? finalProviderMetadata,
|
|
3359
3363
|
text: self.#bufferedText.join(""),
|
|
3360
3364
|
warnings: baseFinishStep.warnings ?? [],
|
|
3361
3365
|
finishReason: chunk.payload.stepResult.reason,
|
|
@@ -4547,6 +4551,7 @@ function convertFullStreamChunkToMastra(value, ctx) {
|
|
|
4547
4551
|
runId: ctx.runId,
|
|
4548
4552
|
from: "AGENT" /* AGENT */,
|
|
4549
4553
|
payload: {
|
|
4554
|
+
providerMetadata: value.providerMetadata,
|
|
4550
4555
|
stepResult: {
|
|
4551
4556
|
reason: normalizeFinishReason(value.finishReason)
|
|
4552
4557
|
},
|
|
@@ -4557,7 +4562,11 @@ function convertFullStreamChunkToMastra(value, ctx) {
|
|
|
4557
4562
|
metadata: {
|
|
4558
4563
|
providerMetadata: value.providerMetadata
|
|
4559
4564
|
},
|
|
4560
|
-
messages
|
|
4565
|
+
messages: messages ?? {
|
|
4566
|
+
all: [],
|
|
4567
|
+
user: [],
|
|
4568
|
+
nonUser: []
|
|
4569
|
+
},
|
|
4561
4570
|
...rest
|
|
4562
4571
|
}
|
|
4563
4572
|
};
|
|
@@ -4701,7 +4710,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
4701
4710
|
providerMetadata: chunk.payload.providerMetadata
|
|
4702
4711
|
};
|
|
4703
4712
|
case "step-finish": {
|
|
4704
|
-
const { request: _request, providerMetadata, ...rest2 } = chunk.payload.metadata;
|
|
4713
|
+
const { request: _request, providerMetadata: metadataProviderMetadata, ...rest2 } = chunk.payload.metadata;
|
|
4705
4714
|
return {
|
|
4706
4715
|
type: "finish-step",
|
|
4707
4716
|
response: {
|
|
@@ -4712,7 +4721,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
4712
4721
|
},
|
|
4713
4722
|
usage: chunk.payload.output.usage,
|
|
4714
4723
|
finishReason: chunk.payload.stepResult.reason,
|
|
4715
|
-
providerMetadata
|
|
4724
|
+
providerMetadata: metadataProviderMetadata ?? chunk.payload.providerMetadata
|
|
4716
4725
|
};
|
|
4717
4726
|
}
|
|
4718
4727
|
case "text-delta":
|
|
@@ -11517,7 +11526,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
11517
11526
|
}
|
|
11518
11527
|
});
|
|
11519
11528
|
}
|
|
11520
|
-
const resolvedModel = await
|
|
11529
|
+
const resolvedModel = await chunkI2O2QKDG_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
|
|
11521
11530
|
const judgeModel = resolvedModel.modelId;
|
|
11522
11531
|
const judge = new Agent({
|
|
11523
11532
|
id: "judge",
|
|
@@ -12720,7 +12729,7 @@ async function processOutputStream({
|
|
|
12720
12729
|
break;
|
|
12721
12730
|
case "finish":
|
|
12722
12731
|
runState.setState({
|
|
12723
|
-
providerOptions: chunk.payload.metadata.providerMetadata,
|
|
12732
|
+
providerOptions: chunk.payload.metadata?.providerMetadata ?? chunk.payload.providerMetadata,
|
|
12724
12733
|
stepResult: {
|
|
12725
12734
|
reason: chunk.payload.reason,
|
|
12726
12735
|
logprobs: chunk.payload.logprobs,
|
|
@@ -13224,7 +13233,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
|
|
|
13224
13233
|
}
|
|
13225
13234
|
});
|
|
13226
13235
|
let transportResolver;
|
|
13227
|
-
if (currentStep.model instanceof
|
|
13236
|
+
if (currentStep.model instanceof chunkI2O2QKDG_cjs.ModelRouterLanguageModel) {
|
|
13228
13237
|
const routerModel = currentStep.model;
|
|
13229
13238
|
transportResolver = () => routerModel._getStreamTransport();
|
|
13230
13239
|
}
|
|
@@ -20101,7 +20110,7 @@ ${errorMessages}`,
|
|
|
20101
20110
|
*/
|
|
20102
20111
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
20103
20112
|
try {
|
|
20104
|
-
return await
|
|
20113
|
+
return await chunkI2O2QKDG_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
20105
20114
|
} catch (error) {
|
|
20106
20115
|
const mastraError = new chunk4U7ZLI36_cjs.MastraError({
|
|
20107
20116
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -22195,7 +22204,7 @@ ${effectiveInstructions}`;
|
|
|
22195
22204
|
const resolvedModel = await this.resolveModelConfig(selection, requestContext);
|
|
22196
22205
|
this.assertSupportsPreparedModels(resolvedModel);
|
|
22197
22206
|
let headers;
|
|
22198
|
-
if (resolvedModel instanceof
|
|
22207
|
+
if (resolvedModel instanceof chunkI2O2QKDG_cjs.ModelRouterLanguageModel) {
|
|
22199
22208
|
headers = resolvedModel.config?.headers;
|
|
22200
22209
|
}
|
|
22201
22210
|
return [
|
|
@@ -22227,7 +22236,7 @@ ${effectiveInstructions}`;
|
|
|
22227
22236
|
throw mastraError;
|
|
22228
22237
|
}
|
|
22229
22238
|
let headers;
|
|
22230
|
-
if (model instanceof
|
|
22239
|
+
if (model instanceof chunkI2O2QKDG_cjs.ModelRouterLanguageModel) {
|
|
22231
22240
|
headers = model.config?.headers;
|
|
22232
22241
|
}
|
|
22233
22242
|
return {
|
|
@@ -22274,7 +22283,7 @@ ${effectiveInstructions}`;
|
|
|
22274
22283
|
model: options.model
|
|
22275
22284
|
});
|
|
22276
22285
|
const resolvedModel = llm.getModel();
|
|
22277
|
-
const isGatewayModel = resolvedModel instanceof
|
|
22286
|
+
const isGatewayModel = resolvedModel instanceof chunkI2O2QKDG_cjs.ModelRouterLanguageModel && resolvedModel.gatewayId === "mastra";
|
|
22278
22287
|
if (resourceId && threadFromArgs && !this.hasOwnMemory() && !isGatewayModel) {
|
|
22279
22288
|
this.logger.warn("No memory is configured but resourceId and threadId were passed in args", { agent: this.name });
|
|
22280
22289
|
}
|
|
@@ -26847,7 +26856,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
26847
26856
|
);
|
|
26848
26857
|
}
|
|
26849
26858
|
if (typeof config.embedder === "string") {
|
|
26850
|
-
this.embedder = new
|
|
26859
|
+
this.embedder = new chunkI2O2QKDG_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
26851
26860
|
} else {
|
|
26852
26861
|
this.embedder = config.embedder;
|
|
26853
26862
|
}
|
|
@@ -26860,7 +26869,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
26860
26869
|
}
|
|
26861
26870
|
if (config.embedder) {
|
|
26862
26871
|
if (typeof config.embedder === "string") {
|
|
26863
|
-
this.embedder = new
|
|
26872
|
+
this.embedder = new chunkI2O2QKDG_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
26864
26873
|
} else {
|
|
26865
26874
|
this.embedder = config.embedder;
|
|
26866
26875
|
}
|
|
@@ -26900,7 +26909,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
26900
26909
|
}
|
|
26901
26910
|
setEmbedder(embedder, embedderOptions) {
|
|
26902
26911
|
if (typeof embedder === "string") {
|
|
26903
|
-
this.embedder = new
|
|
26912
|
+
this.embedder = new chunkI2O2QKDG_cjs.ModelRouterEmbeddingModel(embedder);
|
|
26904
26913
|
} else {
|
|
26905
26914
|
this.embedder = embedder;
|
|
26906
26915
|
}
|
|
@@ -27660,5 +27669,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
27660
27669
|
exports.validateStepResumeData = validateStepResumeData;
|
|
27661
27670
|
exports.validateStepStateData = validateStepStateData;
|
|
27662
27671
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
27663
|
-
//# sourceMappingURL=chunk-
|
|
27664
|
-
//# sourceMappingURL=chunk-
|
|
27672
|
+
//# sourceMappingURL=chunk-2AARITCG.cjs.map
|
|
27673
|
+
//# sourceMappingURL=chunk-2AARITCG.cjs.map
|