Effect CommunityEC
Effect Community5mo ago
9 replies
vivi

Error with `generateObject` Using Mixtral Pixtral Large on Bedrock

I'm trying to use Mixtral Pixtral Large via Bedrock using the us.mistral.pixtral-large-2502-v1:0 cross-region inference endpoint. When I try to use generateObject I get this error from bedrock:

{"message":"This model doesn't support the toolConfig.toolChoice.tool field. Remove toolConfig.toolChoice.tool and try again."}


But as far as I can tell, this model does support tool calling - it just doesn't seem to support the toolChoice: { tool } option for giving it a specific tool choice.

The Bedrock docs for SpecificToolChoice say that this is only suported for Claude 3 models which must be an outdated comment because it seems to work for GPT-OSS and Nova models as well.

Is there any way to use generateObject without this specific parameter, and use prompt engineering to require it to call the tool instead?
Was this page helpful?