@ai-sdk/gateway 4.0.138 → 4.0.139
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 +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/docs/00-ai-gateway.mdx +4 -0
- package/package.json +1 -1
- package/src/gateway-provider-options.ts +7 -0
package/docs/00-ai-gateway.mdx
CHANGED
|
@@ -1755,6 +1755,10 @@ The following gateway provider options are available:
|
|
|
1755
1755
|
|
|
1756
1756
|
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.
|
|
1757
1757
|
|
|
1758
|
+
- **headquarters** _string[]_
|
|
1759
|
+
|
|
1760
|
+
Restricts routing to providers whose parent company is headquartered in the listed countries, given as ISO 3166-1 alpha-2 codes (for example `['US', 'DE']`). To exclude countries instead, prefix every code with `!`, as in `['!US']`. A list can't mix allowed and excluded countries. The filter applies to both BYOK and system credentials, since it's about the provider rather than the credential. Providers without a recorded headquarters country are always excluded. If no provider for the model is headquartered in an allowed country, the request fails.
|
|
1761
|
+
|
|
1758
1762
|
- **quotaEntityId** _string_
|
|
1759
1763
|
|
|
1760
1764
|
The unique identifier for the entity against which quota is tracked. Used for quota management and enforcement purposes.
|
package/package.json
CHANGED
|
@@ -70,6 +70,13 @@ export type GatewayProviderOptions<QUESTION_ID extends string = string> = {
|
|
|
70
70
|
/** Filter to providers that do not train on prompt data. */
|
|
71
71
|
disallowPromptTraining?: boolean;
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Route only to providers headquartered in these countries (ISO 3166-1
|
|
75
|
+
* alpha-2 codes, e.g. `['US', 'DE']`), or prefix every code with `!` to
|
|
76
|
+
* exclude countries instead (e.g. `['!US']`). A list can't mix the two.
|
|
77
|
+
*/
|
|
78
|
+
headquarters?: string[];
|
|
79
|
+
|
|
73
80
|
/**
|
|
74
81
|
* Restrict routing to provider models that satisfy every given entry.
|
|
75
82
|
*
|