fix(agents): replace anyOf with string in image tool schema
Anthropic's API rejects `anyOf` in `input_schema`, causing all Claude requests to fail when the image tool is registered. Replace `Type.Union([Type.String(), Type.Array(Type.String())])` with `Type.String()` — the execute handler already normalizes both string and array inputs, so this is schema-only. Fixes #18551
This commit is contained in:
@@ -376,7 +376,7 @@ export function createImageTool(options?: {
|
||||
description,
|
||||
parameters: Type.Object({
|
||||
prompt: Type.Optional(Type.String()),
|
||||
image: Type.Union([Type.String(), Type.Array(Type.String())]),
|
||||
image: Type.String({ description: "Image path or URL (pass multiple as comma-separated)" }),
|
||||
model: Type.Optional(Type.String()),
|
||||
maxBytesMb: Type.Optional(Type.Number()),
|
||||
maxImages: Type.Optional(Type.Number()),
|
||||
|
||||
Reference in New Issue
Block a user