@ai-sdk/provider 4.0.7 → 4.0.9

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,17 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 4.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - aa45741: fix(provider/anthropic): preserve native message batch request counts in provider metadata and support the full language-model option surface in batch requests
8
+
9
+ ## 4.0.8
10
+
11
+ ### Patch Changes
12
+
13
+ - 591d25b: feat: add batch completion webhooks. `experimental_startTextBatch` accepts a `webhookUrl`, and the gateway provider registers it through the batch `callbackUrl` contract and exports typed async-job metadata. Direct Anthropic and OpenAI batch providers return an unsupported warning when the option is provided.
14
+
3
15
  ## 4.0.7
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -365,6 +365,12 @@ type BatchV4StartOptions<REQUEST> = {
365
365
  readonly providerOptions?: SharedV4ProviderOptions;
366
366
  readonly abortSignal?: AbortSignal;
367
367
  readonly headers?: Record<string, string | undefined>;
368
+ /**
369
+ * URL the provider notifies when the batch reaches a terminal state.
370
+ * Providers that do not support completion webhooks should return an
371
+ * unsupported warning.
372
+ */
373
+ readonly webhookUrl?: string;
368
374
  };
369
375
  /**
370
376
  * Result of starting a batch.
@@ -4948,7 +4954,7 @@ type LanguageModelV4BatchRequest = {
4948
4954
  /**
4949
4955
  * Normalized text-generation options for the request.
4950
4956
  */
4951
- readonly options: Pick<LanguageModelV4CallOptions, 'prompt' | 'maxOutputTokens' | 'temperature' | 'stopSequences' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'seed' | 'reasoning' | 'providerOptions'>;
4957
+ readonly options: Pick<LanguageModelV4CallOptions, 'prompt' | 'maxOutputTokens' | 'temperature' | 'stopSequences' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'seed' | 'reasoning' | 'responseFormat' | 'toolChoice' | 'tools' | 'providerOptions'>;
4952
4958
  };
4953
4959
  /**
4954
4960
  * Language model V4 with durable batch-processing support.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -31,9 +31,9 @@
31
31
  "devDependencies": {
32
32
  "@types/json-schema": "7.0.15",
33
33
  "@types/node": "22.19.19",
34
+ "@vercel/ai-tsconfig": "0.0.0",
34
35
  "tsup": "^8.5.1",
35
- "typescript": "5.8.3",
36
- "@vercel/ai-tsconfig": "0.0.0"
36
+ "typescript": "5.8.3"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=22"
@@ -40,6 +40,13 @@ export type BatchV4StartOptions<REQUEST> = {
40
40
  readonly providerOptions?: SharedV4ProviderOptions;
41
41
  readonly abortSignal?: AbortSignal;
42
42
  readonly headers?: Record<string, string | undefined>;
43
+
44
+ /**
45
+ * URL the provider notifies when the batch reaches a terminal state.
46
+ * Providers that do not support completion webhooks should return an
47
+ * unsupported warning.
48
+ */
49
+ readonly webhookUrl?: string;
43
50
  };
44
51
 
45
52
  /**
@@ -28,6 +28,9 @@ export type LanguageModelV4BatchRequest = {
28
28
  | 'frequencyPenalty'
29
29
  | 'seed'
30
30
  | 'reasoning'
31
+ | 'responseFormat'
32
+ | 'toolChoice'
33
+ | 'tools'
31
34
  | 'providerOptions'
32
35
  >;
33
36
  };