Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Bedrock - extraneous key [disable_parallel_tool_use] is not permitted #592

Open
ShantanuNair opened this issue Nov 6, 2024 · 0 comments

Comments

@ShantanuNair
Copy link

ShantanuNair commented Nov 6, 2024

Bedrock SDK client cannot take in tool_choice param for disable_parallel_tool_use. I am on latest anthropic sdk 0.32.1 and bedrock package 0.11.2.

Current Behavior:

Supplying the field returns:

Message: 400 Malformed input request: #: subject must not be valid against schema {"required":["messages"]}#/tool_choice: extraneous key [disable_parallel_tool_use] is not permitted, please reformat your input and try again.

Expected Behavior:

We can set disable parallel tool use in tool_choice.

Reproduction:

const response = await bedrock.messages.create({
  model: modelId,
  temperature,
  system: summaryPrompt,
  tools: [tools.extractSummary],
  tool_choice: {
    name: 'extract_summary',
    type: 'tool',
    disable_parallel_tool_use: true,
  },
  messages: [
    {
      role: 'user',
      content: [
        {
          type: 'text',
          text: `${context}
          Write a summary for above.`,
        },
      ],
    },
  ],
  max_tokens: 7000,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant