@ai-sdk/anthropic 3.0.0-beta.82 → 3.0.0-beta.84

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/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  } from "@ai-sdk/provider-utils";
12
12
 
13
13
  // src/version.ts
14
- var VERSION = true ? "3.0.0-beta.82" : "0.0.0-test";
14
+ var VERSION = true ? "3.0.0-beta.84" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -167,11 +167,18 @@ var anthropicMessagesResponseSchema = lazySchema2(
167
167
  type: z2.literal("document"),
168
168
  title: z2.string().nullable(),
169
169
  citations: z2.object({ enabled: z2.boolean() }).optional(),
170
- source: z2.object({
171
- type: z2.literal("text"),
172
- media_type: z2.string(),
173
- data: z2.string()
174
- })
170
+ source: z2.union([
171
+ z2.object({
172
+ type: z2.literal("base64"),
173
+ media_type: z2.literal("application/pdf"),
174
+ data: z2.string()
175
+ }),
176
+ z2.object({
177
+ type: z2.literal("text"),
178
+ media_type: z2.literal("text/plain"),
179
+ data: z2.string()
180
+ })
181
+ ])
175
182
  })
176
183
  }),
177
184
  z2.object({
@@ -404,11 +411,18 @@ var anthropicMessagesChunkSchema = lazySchema2(
404
411
  type: z2.literal("document"),
405
412
  title: z2.string().nullable(),
406
413
  citations: z2.object({ enabled: z2.boolean() }).optional(),
407
- source: z2.object({
408
- type: z2.literal("text"),
409
- media_type: z2.string(),
410
- data: z2.string()
411
- })
414
+ source: z2.union([
415
+ z2.object({
416
+ type: z2.literal("base64"),
417
+ media_type: z2.literal("application/pdf"),
418
+ data: z2.string()
419
+ }),
420
+ z2.object({
421
+ type: z2.literal("text"),
422
+ media_type: z2.literal("text/plain"),
423
+ data: z2.string()
424
+ })
425
+ ])
412
426
  })
413
427
  }),
414
428
  z2.object({