@mastra/memory 1.15.0 → 1.15.1-alpha.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.15.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed gateway model detection to use duck typing instead of instanceof check, preventing potential failures from cross-package module resolution issues. Propagates `gatewayId` through the AISDKV5LanguageModel wrapper so duck-type detection works even when models are re-wrapped. ([#15168](https://github.com/mastra-ai/mastra/pull/15168))
8
+
9
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6)]:
10
+ - @mastra/core@1.24.2-alpha.0
11
+
3
12
  ## 1.15.0
4
13
 
5
14
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_RETRIEVAL_INSTRUCTIONS, OBSERVATION_CONTINUATION_HINT } from './chunk-LSJJAJAF.js';
2
2
  import { coreFeatures } from '@mastra/core/features';
3
- import { resolveModelConfig, ModelRouterLanguageModel } from '@mastra/core/llm';
3
+ import { resolveModelConfig } from '@mastra/core/llm';
4
4
  import { getThreadOMMetadata, setThreadOMMetadata, parseMemoryRequestContext } from '@mastra/core/memory';
5
5
  import { MessageHistory } from '@mastra/core/processors';
6
6
  import xxhash from 'xxhash-wasm';
@@ -8624,7 +8624,7 @@ function getOmObservabilityContext(args) {
8624
8624
  }
8625
8625
  var GATEWAY_STATE_KEY = "__isGatewayModel";
8626
8626
  function isMastraGatewayModel(model) {
8627
- return model instanceof ModelRouterLanguageModel && model.gatewayId === "mastra";
8627
+ return typeof model === "object" && model !== null && "gatewayId" in model && model.gatewayId === "mastra";
8628
8628
  }
8629
8629
  var ObservationalMemoryProcessor = class {
8630
8630
  id = "observational-memory";
@@ -8834,5 +8834,5 @@ function getObservationsAsOf(activeObservations, asOf) {
8834
8834
  }
8835
8835
 
8836
8836
  export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, formatToolResultForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, resolveToolResultValue, stripEphemeralAnchorIds, stripObservationGroups, truncateStringByTokens, wrapInObservationGroup };
8837
- //# sourceMappingURL=chunk-42AZEBIK.js.map
8838
- //# sourceMappingURL=chunk-42AZEBIK.js.map
8837
+ //# sourceMappingURL=chunk-HAEQMUD4.js.map
8838
+ //# sourceMappingURL=chunk-HAEQMUD4.js.map