@ai-sdk/gateway 4.0.105 → 4.0.107
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 +22 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/docs/00-ai-gateway.mdx +2 -2
- package/package.json +3 -3
- package/src/gateway-decision-model-settings.ts +1 -0
- package/src/gateway-decision-model.ts +3 -0
- package/src/gateway-image-model-settings.ts +1 -0
- package/src/gateway-language-model-settings.ts +1 -0
- package/src/gateway-transcription-model-settings.ts +0 -1
- package/src/gateway-video-model-settings.ts +2 -0
package/docs/00-ai-gateway.mdx
CHANGED
|
@@ -247,7 +247,7 @@ import {
|
|
|
247
247
|
// The receiver uses this token to look up the expected batch and signing
|
|
248
248
|
// secret before trusting anything in the webhook body.
|
|
249
249
|
const token = randomUUID();
|
|
250
|
-
const model = 'anthropic/claude-haiku-
|
|
250
|
+
const model = 'anthropic/claude-haiku-5.5' as const;
|
|
251
251
|
|
|
252
252
|
// Reserve the token before starting so an early delivery finds a retryable
|
|
253
253
|
// pending record rather than an unknown callback.
|
|
@@ -1412,7 +1412,7 @@ import { gateway, streamText } from 'ai';
|
|
|
1412
1412
|
|
|
1413
1413
|
// 1. Make requests with tags
|
|
1414
1414
|
const result = streamText({
|
|
1415
|
-
model: gateway('anthropic/claude-haiku-
|
|
1415
|
+
model: gateway('anthropic/claude-haiku-5.5'),
|
|
1416
1416
|
prompt: 'Summarize this quarter's results',
|
|
1417
1417
|
providerOptions: {
|
|
1418
1418
|
gateway: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/gateway",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.107",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ai-sdk/provider": "4.0.
|
|
34
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
33
|
+
"@ai-sdk/provider": "4.0.24",
|
|
34
|
+
"@ai-sdk/provider-utils": "5.0.56",
|
|
35
35
|
"@vercel/oidc": "3.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -142,6 +142,9 @@ const gatewayDecisionAnswerSchema = z.discriminatedUnion('type', [
|
|
|
142
142
|
type: z.literal('boolean'),
|
|
143
143
|
probability: z.number(),
|
|
144
144
|
}),
|
|
145
|
+
z.object({
|
|
146
|
+
type: z.literal('refusal'),
|
|
147
|
+
}),
|
|
145
148
|
]);
|
|
146
149
|
|
|
147
150
|
const gatewayDecisionWarningSchema = z.discriminatedUnion('type', [
|
|
@@ -2,7 +2,6 @@ export type GatewayTranscriptionModelId =
|
|
|
2
2
|
| 'fish-audio/transcribe-1'
|
|
3
3
|
| 'google/gemini-3.5-transcribe'
|
|
4
4
|
| 'google/gemini-3.5-transcribe-live'
|
|
5
|
-
| 'microsoft/mai-transcribe-1.5'
|
|
6
5
|
| 'microsoft/mai-transcribe-2'
|
|
7
6
|
| 'microsoft/mai-transcribe-2-streaming'
|
|
8
7
|
| 'openai/gpt-4o-mini-transcribe'
|