@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.
@@ -152,11 +152,18 @@ var anthropicMessagesResponseSchema = lazySchema2(
152
152
  type: z2.literal("document"),
153
153
  title: z2.string().nullable(),
154
154
  citations: z2.object({ enabled: z2.boolean() }).optional(),
155
- source: z2.object({
156
- type: z2.literal("text"),
157
- media_type: z2.string(),
158
- data: z2.string()
159
- })
155
+ source: z2.union([
156
+ z2.object({
157
+ type: z2.literal("base64"),
158
+ media_type: z2.literal("application/pdf"),
159
+ data: z2.string()
160
+ }),
161
+ z2.object({
162
+ type: z2.literal("text"),
163
+ media_type: z2.literal("text/plain"),
164
+ data: z2.string()
165
+ })
166
+ ])
160
167
  })
161
168
  }),
162
169
  z2.object({
@@ -389,11 +396,18 @@ var anthropicMessagesChunkSchema = lazySchema2(
389
396
  type: z2.literal("document"),
390
397
  title: z2.string().nullable(),
391
398
  citations: z2.object({ enabled: z2.boolean() }).optional(),
392
- source: z2.object({
393
- type: z2.literal("text"),
394
- media_type: z2.string(),
395
- data: z2.string()
396
- })
399
+ source: z2.union([
400
+ z2.object({
401
+ type: z2.literal("base64"),
402
+ media_type: z2.literal("application/pdf"),
403
+ data: z2.string()
404
+ }),
405
+ z2.object({
406
+ type: z2.literal("text"),
407
+ media_type: z2.literal("text/plain"),
408
+ data: z2.string()
409
+ })
410
+ ])
397
411
  })
398
412
  }),
399
413
  z2.object({