ai 5.0.113 → 5.0.114

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,11 @@
1
1
  # ai
2
2
 
3
+ ## 5.0.114
4
+
5
+ ### Patch Changes
6
+
7
+ - fc633bd: fix header loss when statusText is undefined in writeHead
8
+
3
9
  ## 5.0.113
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -777,7 +777,7 @@ function detectMediaType({
777
777
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
778
778
 
779
779
  // src/version.ts
780
- var VERSION = true ? "5.0.113" : "0.0.0-test";
780
+ var VERSION = true ? "5.0.114" : "0.0.0-test";
781
781
 
782
782
  // src/util/download/download.ts
783
783
  var download = async ({ url }) => {
@@ -2848,7 +2848,12 @@ function writeToServerResponse({
2848
2848
  headers,
2849
2849
  stream
2850
2850
  }) {
2851
- response.writeHead(status != null ? status : 200, statusText, headers);
2851
+ const statusCode = status != null ? status : 200;
2852
+ if (statusText !== void 0) {
2853
+ response.writeHead(statusCode, statusText, headers);
2854
+ } else {
2855
+ response.writeHead(statusCode, headers);
2856
+ }
2852
2857
  const reader = stream.getReader();
2853
2858
  const read = async () => {
2854
2859
  try {