@posthog/ai 7.2.1 → 7.2.2

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.
@@ -22,7 +22,7 @@ function _interopNamespaceDefault(e) {
22
22
 
23
23
  var uuid__namespace = /*#__PURE__*/_interopNamespaceDefault(uuid);
24
24
 
25
- var version = "7.2.1";
25
+ var version = "7.2.2";
26
26
 
27
27
  // Type guards for safer type checking
28
28
 
@@ -521,7 +521,7 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
521
521
  }
522
522
  static fromMethods(methods) {
523
523
  class Handler extends BaseCallbackHandler {
524
- name = uuid__namespace.v4();
524
+ name = uuid__namespace.v7();
525
525
  constructor() {
526
526
  super();
527
527
  Object.assign(this, methods);
@@ -537,6 +537,15 @@ const isBaseCallbackHandler = (x) => {
537
537
 
538
538
  const REDACTED_IMAGE_PLACEHOLDER = '[base64 image redacted]';
539
539
 
540
+ // ============================================
541
+ // Multimodal Feature Toggle
542
+ // ============================================
543
+
544
+ const isMultimodalEnabled = () => {
545
+ const val = process.env._INTERNAL_LLMA_MULTIMODAL || '';
546
+ return val.toLowerCase() === 'true' || val === '1' || val.toLowerCase() === 'yes';
547
+ };
548
+
540
549
  // ============================================
541
550
  // Base64 Detection Helpers
542
551
  // ============================================
@@ -564,6 +573,7 @@ const isRawBase64 = str => {
564
573
  return str.length > 20 && /^[A-Za-z0-9+/]+=*$/.test(str);
565
574
  };
566
575
  function redactBase64DataUrl(str) {
576
+ if (isMultimodalEnabled()) return str;
567
577
  if (!isString(str)) return str;
568
578
 
569
579
  // Check for data URL format
@@ -632,6 +642,7 @@ const sanitizeLangChainImage = item => {
632
642
 
633
643
  // Anthropic style
634
644
  if (item.type === 'image' && 'source' in item && isObject(item.source) && 'data' in item.source) {
645
+ if (isMultimodalEnabled()) return item;
635
646
  return {
636
647
  ...item,
637
648
  source: {