Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,20 @@
"type": {
"type": "string",
"enum": ["file"]
},
"cache_control": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["ephemeral"]
},
"ttl": {
"type": "string",
"enum": ["5m", "1h"]
}
},
"required": ["type"]
}
},
"required": ["file", "type"],
Expand Down Expand Up @@ -918,6 +932,20 @@
"type": {
"type": "string",
"enum": ["image_url"]
},
"cache_control": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["ephemeral"]
},
"ttl": {
"type": "string",
"enum": ["5m", "1h"]
}
},
"required": ["type"]
}
},
"required": ["image_url", "type"],
Expand All @@ -940,6 +968,10 @@
"type": {
"type": "string",
"enum": ["ephemeral"]
},
"ttl": {
"type": "string",
"enum": ["5m", "1h"]
}
},
"required": ["type"]
Expand All @@ -964,6 +996,10 @@
"type": {
"type": "string",
"enum": ["ephemeral"]
},
"ttl": {
"type": "string",
"enum": ["5m", "1h"]
}
},
"required": ["type"]
Expand Down
28 changes: 25 additions & 3 deletions js/src/generated_types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated file (content hash 0ba4b792e8f1345d) -- do not modify
// Auto-generated file (content hash 7817da7abc7229e4) -- do not modify

import { z } from "zod/v3";

Expand Down Expand Up @@ -375,7 +375,12 @@ export type CallEventType = z.infer<typeof CallEvent>;
export const ChatCompletionContentPartTextWithTitle = z.object({
text: z.string().default(""),
type: z.literal("text"),
cache_control: z.object({ type: z.literal("ephemeral") }).optional(),
cache_control: z
.object({
type: z.literal("ephemeral"),
ttl: z.enum(["5m", "1h"]).optional(),
})
.optional(),
});
export type ChatCompletionContentPartTextWithTitleType = z.infer<
typeof ChatCompletionContentPartTextWithTitle
Expand All @@ -388,6 +393,12 @@ export const ChatCompletionContentPartImageWithTitle = z.object({
.optional(),
}),
type: z.literal("image_url"),
cache_control: z
.object({
type: z.literal("ephemeral"),
ttl: z.enum(["5m", "1h"]).optional(),
})
.optional(),
});
export type ChatCompletionContentPartImageWithTitleType = z.infer<
typeof ChatCompletionContentPartImageWithTitle
Expand All @@ -401,6 +412,12 @@ export type ChatCompletionContentPartFileFileType = z.infer<
export const ChatCompletionContentPartFileWithTitle = z.object({
file: ChatCompletionContentPartFileFile,
type: z.literal("file"),
cache_control: z
.object({
type: z.literal("ephemeral"),
ttl: z.enum(["5m", "1h"]).optional(),
})
.optional(),
});
export type ChatCompletionContentPartFileWithTitleType = z.infer<
typeof ChatCompletionContentPartFileWithTitle
Expand All @@ -416,7 +433,12 @@ export type ChatCompletionContentPartType = z.infer<
export const ChatCompletionContentPartText = z.object({
text: z.string().default(""),
type: z.literal("text"),
cache_control: z.object({ type: z.literal("ephemeral") }).optional(),
cache_control: z
.object({
type: z.literal("ephemeral"),
ttl: z.enum(["5m", "1h"]).optional(),
})
.optional(),
});
export type ChatCompletionContentPartTextType = z.infer<
typeof ChatCompletionContentPartText
Expand Down
Loading