Open mbokinala opened 4 days ago
I think there's something going on here.
Passing mode.tool.parameters
without stringifying it makes the request work, but breaks types.
inputSchema: { json: mode.tool.parameters },
I got the same issue when using stream Object or generate Object, using bedrock with model claude 3.5 sonnet
ValidationException: The format of the value at toolConfig.tools.0.toolSpec.inputSchema.json is invalid. Provide a json object for the field and try again.
then, i do this and everything went well :
Description
Calling
generateObject()
with the AWS Bedrock Claude 3.5 Sonnet model (bedrock("anthropic.claude-3-5-sonnet-20240620-v1:0")
) causes the following error to occur:Code example
(taken from the
generateObject
example)Additional context
This error does NOT occur when using the regular anthropic provider for the same model (
anthropic("claude-3-5-sonnet-20240620")
).The error also does not occur when using Bedrock with
generateText()