@ai-sdk/gateway 3.0.87 → 3.0.88

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-sdk/gateway
2
2
 
3
+ ## 3.0.88
4
+
5
+ ### Patch Changes
6
+
7
+ - 5f439a1: feat (provider/gateway): add hipaaCompliant gateway provider option
8
+
3
9
  ## 3.0.87
4
10
 
5
11
  ### 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 ? "3.0.87" : "0.0.0-test";
1528
+ var VERSION = true ? "3.0.88" : "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 ? "3.0.87" : "0.0.0-test";
1562
+ var VERSION = true ? "3.0.88" : "0.0.0-test";
1563
1563
 
1564
1564
  // src/gateway-provider.ts
1565
1565
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
@@ -786,6 +786,9 @@ The following gateway provider options are available:
786
786
 
787
787
  Restricts routing requests to providers that have agreements with Vercel for AI Gateway to not use prompts for model training. If there are no providers available for the model that disallow prompt training, the request will fail. BYOK credentials are skipped when `disallowPromptTraining` is set to `true` to ensure that requests are only routed to providers that do not train on prompt data.
788
788
 
789
+ - **hipaaCompliant** _boolean_
790
+
791
+ 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.
789
792
 
790
793
  - **providerTimeouts** _object_
791
794
 
@@ -876,6 +879,25 @@ const { text } = await generateText({
876
879
  });
877
880
  ```
878
881
 
882
+ #### HIPAA Compliance Example
883
+
884
+ 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.
885
+
886
+ ```ts
887
+ import type { GatewayProviderOptions } from '@ai-sdk/gateway';
888
+ import { generateText } from 'ai';
889
+
890
+ const { text } = await generateText({
891
+ model: 'anthropic/claude-sonnet-4.6',
892
+ prompt: 'Analyze this patient data...',
893
+ providerOptions: {
894
+ gateway: {
895
+ hipaaCompliant: true,
896
+ } satisfies GatewayProviderOptions,
897
+ },
898
+ });
899
+ ```
900
+
879
901
  ### Provider-Specific Options
880
902
 
881
903
  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": "3.0.87",
4
+ "version": "3.0.88",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -65,6 +65,12 @@ const gatewayProviderOptions = lazySchema(() =>
65
65
  * to not use prompts for model training will be used.
66
66
  */
67
67
  disallowPromptTraining: z.boolean().optional(),
68
+ /**
69
+ * Whether to filter by only providers that are HIPAA compliant with
70
+ * Vercel AI Gateway. When enabled, only providers that have agreements
71
+ * with Vercel AI Gateway for HIPAA compliance will be used.
72
+ */
73
+ hipaaCompliant: z.boolean().optional(),
68
74
  /**
69
75
  * Per-provider timeouts for BYOK credentials in milliseconds.
70
76
  * Controls how long to wait for a provider to start responding