@ai-sdk/anthropic 2.0.55 → 2.0.56

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.
@@ -111,11 +111,18 @@ var anthropicMessagesResponseSchema = lazySchema2(
111
111
  type: z2.literal("document"),
112
112
  title: z2.string().nullable(),
113
113
  citations: z2.object({ enabled: z2.boolean() }).optional(),
114
- source: z2.object({
115
- type: z2.literal("text"),
116
- media_type: z2.string(),
117
- data: z2.string()
118
- })
114
+ source: z2.union([
115
+ z2.object({
116
+ type: z2.literal("base64"),
117
+ media_type: z2.literal("application/pdf"),
118
+ data: z2.string()
119
+ }),
120
+ z2.object({
121
+ type: z2.literal("text"),
122
+ media_type: z2.literal("text/plain"),
123
+ data: z2.string()
124
+ })
125
+ ])
119
126
  })
120
127
  }),
121
128
  z2.object({
@@ -294,11 +301,18 @@ var anthropicMessagesChunkSchema = lazySchema2(
294
301
  type: z2.literal("document"),
295
302
  title: z2.string().nullable(),
296
303
  citations: z2.object({ enabled: z2.boolean() }).optional(),
297
- source: z2.object({
298
- type: z2.literal("text"),
299
- media_type: z2.string(),
300
- data: z2.string()
301
- })
304
+ source: z2.union([
305
+ z2.object({
306
+ type: z2.literal("base64"),
307
+ media_type: z2.literal("application/pdf"),
308
+ data: z2.string()
309
+ }),
310
+ z2.object({
311
+ type: z2.literal("text"),
312
+ media_type: z2.literal("text/plain"),
313
+ data: z2.string()
314
+ })
315
+ ])
302
316
  })
303
317
  }),
304
318
  z2.object({