@ai-sdk/gateway 4.0.0-canary.72 → 4.0.0-canary.74
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 +14 -0
- package/dist/index.js +1 -1
- package/docs/00-ai-gateway.mdx +0 -7
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/gateway
|
|
2
2
|
|
|
3
|
+
## 4.0.0-canary.74
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ca39020]
|
|
8
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
9
|
+
|
|
10
|
+
## 4.0.0-canary.73
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [f634bac]
|
|
15
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
16
|
+
|
|
3
17
|
## 4.0.0-canary.72
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1718,7 +1718,7 @@ async function getVercelRequestId() {
|
|
|
1718
1718
|
}
|
|
1719
1719
|
|
|
1720
1720
|
// src/version.ts
|
|
1721
|
-
var VERSION = true ? "4.0.0-canary.
|
|
1721
|
+
var VERSION = true ? "4.0.0-canary.74" : "0.0.0-test";
|
|
1722
1722
|
|
|
1723
1723
|
// src/gateway-provider.ts
|
|
1724
1724
|
var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
|
package/docs/00-ai-gateway.mdx
CHANGED
|
@@ -132,7 +132,6 @@ tokens](https://vercel.com/docs/oidc) without API Keys.
|
|
|
132
132
|
#### How OIDC Authentication Works
|
|
133
133
|
|
|
134
134
|
1. **In Production/Preview Deployments**:
|
|
135
|
-
|
|
136
135
|
- OIDC authentication is automatically handled
|
|
137
136
|
- No manual configuration needed
|
|
138
137
|
- Tokens are automatically obtained and refreshed
|
|
@@ -586,7 +585,6 @@ The Parallel Search tool supports the following optional configuration options:
|
|
|
586
585
|
- **mode** _'one-shot' | 'agentic'_
|
|
587
586
|
|
|
588
587
|
Mode preset for different use cases:
|
|
589
|
-
|
|
590
588
|
- `'one-shot'` - Comprehensive results with longer excerpts for single-response answers (default)
|
|
591
589
|
- `'agentic'` - Concise, token-efficient results optimized for multi-step agentic workflows
|
|
592
590
|
|
|
@@ -597,7 +595,6 @@ The Parallel Search tool supports the following optional configuration options:
|
|
|
597
595
|
- **sourcePolicy** _object_
|
|
598
596
|
|
|
599
597
|
Source policy for controlling which domains to include/exclude:
|
|
600
|
-
|
|
601
598
|
- `includeDomains` - List of domains to include in search results
|
|
602
599
|
- `excludeDomains` - List of domains to exclude from search results
|
|
603
600
|
- `afterDate` - Only include results published after this date (ISO 8601 format)
|
|
@@ -605,14 +602,12 @@ The Parallel Search tool supports the following optional configuration options:
|
|
|
605
602
|
- **excerpts** _object_
|
|
606
603
|
|
|
607
604
|
Excerpt configuration for controlling result length:
|
|
608
|
-
|
|
609
605
|
- `maxCharsPerResult` - Maximum characters per result
|
|
610
606
|
- `maxCharsTotal` - Maximum total characters across all results
|
|
611
607
|
|
|
612
608
|
- **fetchPolicy** _object_
|
|
613
609
|
|
|
614
610
|
Fetch policy for controlling content freshness:
|
|
615
|
-
|
|
616
611
|
- `maxAgeSeconds` - Maximum age in seconds for cached content (set to 0 for always fresh)
|
|
617
612
|
|
|
618
613
|
The tool works with both `generateText` and `streamText`:
|
|
@@ -783,7 +778,6 @@ The following gateway provider options are available:
|
|
|
783
778
|
- **sort** _'cost' | 'ttft' | 'tps'_
|
|
784
779
|
|
|
785
780
|
Sorts available providers by a performance or cost metric before routing. The gateway will try the best-scoring provider first and fall back through the rest in sorted order. If unspecified, providers are ordered using the gateway's default system ranking.
|
|
786
|
-
|
|
787
781
|
- `'cost'` — lowest cost first
|
|
788
782
|
- `'ttft'` — lowest time-to-first-token first
|
|
789
783
|
- `'tps'` — highest tokens-per-second first
|
|
@@ -821,7 +815,6 @@ The following gateway provider options are available:
|
|
|
821
815
|
Each credential can optionally include a `modelMappings` array to map AI Gateway model slugs to your deployment names (for example, custom Azure deployment names). If a BYOK request fails, the gateway falls back to system credentials using the default model name.
|
|
822
816
|
|
|
823
817
|
Examples:
|
|
824
|
-
|
|
825
818
|
- Single provider: `byok: { 'anthropic': [{ apiKey: 'sk-ant-...' }] }`
|
|
826
819
|
- Multiple credentials: `byok: { 'vertex': [{ project: 'proj-1', googleCredentials: { privateKey: '...', clientEmail: '...' } }, { project: 'proj-2', googleCredentials: { privateKey: '...', clientEmail: '...' } }] }`
|
|
827
820
|
- Multiple providers: `byok: { 'anthropic': [{ apiKey: '...' }], 'bedrock': [{ accessKeyId: '...', secretAccessKey: '...' }] }`
|
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-canary.
|
|
4
|
+
"version": "4.0.0-canary.74",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@vercel/oidc": "3.2.0",
|
|
34
|
-
"@ai-sdk/provider": "
|
|
35
|
-
"@ai-sdk/provider
|
|
34
|
+
"@ai-sdk/provider-utils": "5.0.0-canary.36",
|
|
35
|
+
"@ai-sdk/provider": "4.0.0-canary.16"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "18.15.11",
|