@posthog/ai 8.2.2 → 8.2.3

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.
@@ -530,7 +530,7 @@ function formatOpenAIResponsesInput(input, instructions) {
530
530
  return messages;
531
531
  }
532
532
 
533
- var version = "8.2.2";
533
+ var version = "8.2.3";
534
534
 
535
535
  const DEFAULT_MAX_DEPTH = 3;
536
536
  const MAX_STACK_LINES = 20;
@@ -999,7 +999,10 @@ let WrappedCompletions$1 = class WrappedCompletions extends AzureOpenAI.Chat.Com
999
999
  });
1000
1000
  throw error;
1001
1001
  }
1002
- })();
1002
+ })().catch(() => {
1003
+ // Swallow: analytics must never crash the host process. The caller
1004
+ // already receives this error via their own tee of the stream.
1005
+ });
1003
1006
 
1004
1007
  // Return the other stream to the user
1005
1008
  return stream2;
@@ -1158,7 +1161,10 @@ let WrappedResponses$1 = class WrappedResponses extends AzureOpenAI.Responses {
1158
1161
  });
1159
1162
  throw error;
1160
1163
  }
1161
- })();
1164
+ })().catch(() => {
1165
+ // Swallow: analytics must never crash the host process. The caller
1166
+ // already receives this error via their own tee of the stream.
1167
+ });
1162
1168
  return stream2;
1163
1169
  }
1164
1170
  return value;
@@ -1587,7 +1593,10 @@ class WrappedCompletions extends Completions {
1587
1593
  });
1588
1594
  throw error;
1589
1595
  }
1590
- })();
1596
+ })().catch(() => {
1597
+ // Swallow: analytics must never crash the host process. The caller
1598
+ // already receives this error via their own tee of the stream.
1599
+ });
1591
1600
 
1592
1601
  // Return the other stream to the user
1593
1602
  return stream2;
@@ -1775,7 +1784,10 @@ class WrappedResponses extends Responses {
1775
1784
  });
1776
1785
  throw error;
1777
1786
  }
1778
- })();
1787
+ })().catch(() => {
1788
+ // Swallow: analytics must never crash the host process. The caller
1789
+ // already receives this error via their own tee of the stream.
1790
+ });
1779
1791
  return stream2;
1780
1792
  }
1781
1793
  return value;
@@ -2064,7 +2076,10 @@ class WrappedTranscriptions extends Transcriptions {
2064
2076
  });
2065
2077
  throw error;
2066
2078
  }
2067
- })();
2079
+ })().catch(() => {
2080
+ // Swallow: analytics must never crash the host process. The caller
2081
+ // already receives this error via their own tee of the stream.
2082
+ });
2068
2083
  return stream2;
2069
2084
  }
2070
2085
  return value;