ai 5.0.152 → 5.0.153

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.153
4
+
5
+ ### Patch Changes
6
+
7
+ - c59a31c: Remove custom User-Agent header from HttpChatTransport to fix CORS preflight failures in Safari and Firefox
8
+
3
9
  ## 5.0.152
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -779,7 +779,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
779
779
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
780
780
 
781
781
  // src/version.ts
782
- var VERSION = true ? "5.0.152" : "0.0.0-test";
782
+ var VERSION = true ? "5.0.153" : "0.0.0-test";
783
783
 
784
784
  // src/util/download/download.ts
785
785
  var download = async ({
@@ -9107,14 +9107,10 @@ var HttpChatTransport = class {
9107
9107
  const fetch2 = (_d = this.fetch) != null ? _d : globalThis.fetch;
9108
9108
  const response = await fetch2(api, {
9109
9109
  method: "POST",
9110
- headers: (0, import_provider_utils30.withUserAgentSuffix)(
9111
- {
9112
- "Content-Type": "application/json",
9113
- ...headers
9114
- },
9115
- `ai-sdk/${VERSION}`,
9116
- (0, import_provider_utils30.getRuntimeEnvironmentUserAgent)()
9117
- ),
9110
+ headers: {
9111
+ "Content-Type": "application/json",
9112
+ ...headers
9113
+ },
9118
9114
  body: JSON.stringify(body),
9119
9115
  credentials,
9120
9116
  signal: abortSignal
@@ -9152,11 +9148,7 @@ var HttpChatTransport = class {
9152
9148
  const fetch2 = (_d = this.fetch) != null ? _d : globalThis.fetch;
9153
9149
  const response = await fetch2(api, {
9154
9150
  method: "GET",
9155
- headers: (0, import_provider_utils30.withUserAgentSuffix)(
9156
- headers,
9157
- `ai-sdk/${VERSION}`,
9158
- (0, import_provider_utils30.getRuntimeEnvironmentUserAgent)()
9159
- ),
9151
+ headers,
9160
9152
  credentials
9161
9153
  });
9162
9154
  if (response.status === 204) {