@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.
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 ? "2.0.55" : "0.0.0-test";
14
+ var VERSION = true ? "2.0.56" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -126,11 +126,18 @@ var anthropicMessagesResponseSchema = lazySchema2(
126
126
  type: z2.literal("document"),
127
127
  title: z2.string().nullable(),
128
128
  citations: z2.object({ enabled: z2.boolean() }).optional(),
129
- source: z2.object({
130
- type: z2.literal("text"),
131
- media_type: z2.string(),
132
- data: z2.string()
133
- })
129
+ source: z2.union([
130
+ z2.object({
131
+ type: z2.literal("base64"),
132
+ media_type: z2.literal("application/pdf"),
133
+ data: z2.string()
134
+ }),
135
+ z2.object({
136
+ type: z2.literal("text"),
137
+ media_type: z2.literal("text/plain"),
138
+ data: z2.string()
139
+ })
140
+ ])
134
141
  })
135
142
  }),
136
143
  z2.object({
@@ -309,11 +316,18 @@ var anthropicMessagesChunkSchema = lazySchema2(
309
316
  type: z2.literal("document"),
310
317
  title: z2.string().nullable(),
311
318
  citations: z2.object({ enabled: z2.boolean() }).optional(),
312
- source: z2.object({
313
- type: z2.literal("text"),
314
- media_type: z2.string(),
315
- data: z2.string()
316
- })
319
+ source: z2.union([
320
+ z2.object({
321
+ type: z2.literal("base64"),
322
+ media_type: z2.literal("application/pdf"),
323
+ data: z2.string()
324
+ }),
325
+ z2.object({
326
+ type: z2.literal("text"),
327
+ media_type: z2.literal("text/plain"),
328
+ data: z2.string()
329
+ })
330
+ ])
317
331
  })
318
332
  }),
319
333
  z2.object({