@ai-sdk/anthropic 3.0.0-beta.81 → 3.0.0-beta.83

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.
@@ -165,11 +165,18 @@ var anthropicMessagesResponseSchema = (0, import_provider_utils2.lazySchema)(
165
165
  type: import_v42.z.literal("document"),
166
166
  title: import_v42.z.string().nullable(),
167
167
  citations: import_v42.z.object({ enabled: import_v42.z.boolean() }).optional(),
168
- source: import_v42.z.object({
169
- type: import_v42.z.literal("text"),
170
- media_type: import_v42.z.string(),
171
- data: import_v42.z.string()
172
- })
168
+ source: import_v42.z.union([
169
+ import_v42.z.object({
170
+ type: import_v42.z.literal("base64"),
171
+ media_type: import_v42.z.literal("application/pdf"),
172
+ data: import_v42.z.string()
173
+ }),
174
+ import_v42.z.object({
175
+ type: import_v42.z.literal("text"),
176
+ media_type: import_v42.z.literal("text/plain"),
177
+ data: import_v42.z.string()
178
+ })
179
+ ])
173
180
  })
174
181
  }),
175
182
  import_v42.z.object({
@@ -402,11 +409,18 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
402
409
  type: import_v42.z.literal("document"),
403
410
  title: import_v42.z.string().nullable(),
404
411
  citations: import_v42.z.object({ enabled: import_v42.z.boolean() }).optional(),
405
- source: import_v42.z.object({
406
- type: import_v42.z.literal("text"),
407
- media_type: import_v42.z.string(),
408
- data: import_v42.z.string()
409
- })
412
+ source: import_v42.z.union([
413
+ import_v42.z.object({
414
+ type: import_v42.z.literal("base64"),
415
+ media_type: import_v42.z.literal("application/pdf"),
416
+ data: import_v42.z.string()
417
+ }),
418
+ import_v42.z.object({
419
+ type: import_v42.z.literal("text"),
420
+ media_type: import_v42.z.literal("text/plain"),
421
+ data: import_v42.z.string()
422
+ })
423
+ ])
410
424
  })
411
425
  }),
412
426
  import_v42.z.object({