@ai-sdk/gateway 4.0.0-beta.33 → 4.0.0-beta.35

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,18 @@
1
1
  # @ai-sdk/gateway
2
2
 
3
+ ## 4.0.0-beta.35
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [46d1149]
8
+ - @ai-sdk/provider-utils@5.0.0-beta.12
9
+
10
+ ## 4.0.0-beta.34
11
+
12
+ ### Patch Changes
13
+
14
+ - 71b0e7d: feat (provider/gateway): add hipaaCompliant gateway provider option
15
+
3
16
  ## 4.0.0-beta.33
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -550,6 +550,7 @@ declare const gatewayProviderOptions: _ai_sdk_provider_utils.LazySchema<{
550
550
  byok?: Record<string, Record<string, unknown>[]> | undefined;
551
551
  zeroDataRetention?: boolean | undefined;
552
552
  disallowPromptTraining?: boolean | undefined;
553
+ hipaaCompliant?: boolean | undefined;
553
554
  providerTimeouts?: {
554
555
  byok?: Record<string, number> | undefined;
555
556
  } | undefined;
package/dist/index.d.ts CHANGED
@@ -550,6 +550,7 @@ declare const gatewayProviderOptions: _ai_sdk_provider_utils.LazySchema<{
550
550
  byok?: Record<string, Record<string, unknown>[]> | undefined;
551
551
  zeroDataRetention?: boolean | undefined;
552
552
  disallowPromptTraining?: boolean | undefined;
553
+ hipaaCompliant?: boolean | undefined;
553
554
  providerTimeouts?: {
554
555
  byok?: Record<string, number> | undefined;
555
556
  } | undefined;
package/dist/index.js CHANGED
@@ -1525,7 +1525,7 @@ async function getVercelRequestId() {
1525
1525
  var import_provider_utils14 = require("@ai-sdk/provider-utils");
1526
1526
 
1527
1527
  // src/version.ts
1528
- var VERSION = true ? "4.0.0-beta.33" : "0.0.0-test";
1528
+ var VERSION = true ? "4.0.0-beta.35" : "0.0.0-test";
1529
1529
 
1530
1530
  // src/gateway-provider.ts
1531
1531
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
package/dist/index.mjs CHANGED
@@ -1559,7 +1559,7 @@ async function getVercelRequestId() {
1559
1559
  import { withUserAgentSuffix } from "@ai-sdk/provider-utils";
1560
1560
 
1561
1561
  // src/version.ts
1562
- var VERSION = true ? "4.0.0-beta.33" : "0.0.0-test";
1562
+ var VERSION = true ? "4.0.0-beta.35" : "0.0.0-test";
1563
1563
 
1564
1564
  // src/gateway-provider.ts
1565
1565
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
@@ -788,6 +788,9 @@ The following gateway provider options are available:
788
788
 
789
789
  Restricts routing to providers that have agreements with Vercel for AI Gateway to not use prompts for model training. When using BYOK credentials, this filter is not applied. If BYOK credentials fail and the request falls back to system credentials, only providers that do not train on prompt data will be used. If there are no providers available for the model that disallow prompt training, the request will fail.
790
790
 
791
+ - **hipaaCompliant** _boolean_
792
+
793
+ Restricts routing to models and tools from providers that have signed a BAA with Vercel for the use of AI Gateway (requires Vercel HIPAA BAA add on). BYOK credentials are skipped when `hipaaCompliant` is set to `true` to ensure that requests are only routed to providers that support HIPAA compliance.
791
794
 
792
795
  - **providerTimeouts** _object_
793
796
 
@@ -878,6 +881,25 @@ const { text } = await generateText({
878
881
  });
879
882
  ```
880
883
 
884
+ #### HIPAA Compliance Example
885
+
886
+ Set `hipaaCompliant` to true to route requests only to models or tools by providers that have signed a BAA with Vercel for the use of AI Gateway. If the model or tool does not have a HIPAA-compliant provider, the request will fail. When `hipaaCompliant` is `false` or not specified, there is no enforcement of restricting routing. BYOK credentials are skipped when `hipaaCompliant` is set to `true` to ensure that requests are only routed to providers that support HIPAA compliance.
887
+
888
+ ```ts
889
+ import type { GatewayProviderOptions } from '@ai-sdk/gateway';
890
+ import { generateText } from 'ai';
891
+
892
+ const { text } = await generateText({
893
+ model: 'anthropic/claude-sonnet-4.6',
894
+ prompt: 'Analyze this patient data...',
895
+ providerOptions: {
896
+ gateway: {
897
+ hipaaCompliant: true,
898
+ } satisfies GatewayProviderOptions,
899
+ },
900
+ });
901
+ ```
902
+
881
903
  ### Provider-Specific Options
882
904
 
883
905
  When using provider-specific options through AI Gateway, use the actual provider name (e.g. `anthropic`, `openai`, not `gateway`) as the key:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-sdk/gateway",
3
3
  "private": false,
4
- "version": "4.0.0-beta.33",
4
+ "version": "4.0.0-beta.35",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@vercel/oidc": "3.2.0",
34
34
  "@ai-sdk/provider": "4.0.0-beta.7",
35
- "@ai-sdk/provider-utils": "5.0.0-beta.11"
35
+ "@ai-sdk/provider-utils": "5.0.0-beta.12"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "18.15.11",
@@ -68,6 +68,12 @@ const gatewayProviderOptions = lazySchema(() =>
68
68
  * use prompts for model training will be used.
69
69
  */
70
70
  disallowPromptTraining: z.boolean().optional(),
71
+ /**
72
+ * Whether to filter by only providers that are HIPAA compliant with
73
+ * Vercel AI Gateway. When enabled, only providers that have agreements
74
+ * with Vercel AI Gateway for HIPAA compliance will be used.
75
+ */
76
+ hipaaCompliant: z.boolean().optional(),
71
77
  /**
72
78
  * Per-provider timeouts for BYOK credentials in milliseconds.
73
79
  * Controls how long to wait for a provider to start responding