@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.
@@ -124,11 +124,18 @@ var anthropicMessagesResponseSchema = (0, import_provider_utils2.lazySchema)(
124
124
  type: import_v42.z.literal("document"),
125
125
  title: import_v42.z.string().nullable(),
126
126
  citations: import_v42.z.object({ enabled: import_v42.z.boolean() }).optional(),
127
- source: import_v42.z.object({
128
- type: import_v42.z.literal("text"),
129
- media_type: import_v42.z.string(),
130
- data: import_v42.z.string()
131
- })
127
+ source: import_v42.z.union([
128
+ import_v42.z.object({
129
+ type: import_v42.z.literal("base64"),
130
+ media_type: import_v42.z.literal("application/pdf"),
131
+ data: import_v42.z.string()
132
+ }),
133
+ import_v42.z.object({
134
+ type: import_v42.z.literal("text"),
135
+ media_type: import_v42.z.literal("text/plain"),
136
+ data: import_v42.z.string()
137
+ })
138
+ ])
132
139
  })
133
140
  }),
134
141
  import_v42.z.object({
@@ -307,11 +314,18 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
307
314
  type: import_v42.z.literal("document"),
308
315
  title: import_v42.z.string().nullable(),
309
316
  citations: import_v42.z.object({ enabled: import_v42.z.boolean() }).optional(),
310
- source: import_v42.z.object({
311
- type: import_v42.z.literal("text"),
312
- media_type: import_v42.z.string(),
313
- data: import_v42.z.string()
314
- })
317
+ source: import_v42.z.union([
318
+ import_v42.z.object({
319
+ type: import_v42.z.literal("base64"),
320
+ media_type: import_v42.z.literal("application/pdf"),
321
+ data: import_v42.z.string()
322
+ }),
323
+ import_v42.z.object({
324
+ type: import_v42.z.literal("text"),
325
+ media_type: import_v42.z.literal("text/plain"),
326
+ data: import_v42.z.string()
327
+ })
328
+ ])
315
329
  })
316
330
  }),
317
331
  import_v42.z.object({