feat: allow read tool to handle images (#3052)

This commit is contained in:
Aiden Cline
2025-10-09 09:05:11 -05:00
committed by GitHub
parent eb4b5721cd
commit 225adc46ba
7 changed files with 159 additions and 83 deletions

View File

@@ -28,6 +28,12 @@ export namespace ModelsDev {
context: z.number(),
output: z.number(),
}),
modalities: z
.object({
input: z.array(z.enum(["text", "audio", "image", "video", "pdf"])),
output: z.array(z.enum(["text", "audio", "image", "video", "pdf"])),
})
.optional(),
experimental: z.boolean().optional(),
options: z.record(z.string(), z.any()),
provider: z.object({ npm: z.string() }).optional(),

View File

@@ -279,6 +279,11 @@ export namespace Provider {
context: 0,
output: 0,
},
modalities: model.modalities ??
existing?.modalities ?? {
input: ["text"],
output: ["text"],
},
provider: model.provider ?? existing?.provider,
}
parsed.models[modelID] = parsedModel