dspy: Bedrock LM produces extraneous key error in unclear circumstances

AWS’s Bedrock runtime does not accept the following parameters, however they are still being passed to the LM at some point: n and max_tokens

At what point is this being done? I haven’t specified either value in my code which uses DSPy.

Here’s the full error from boto3:

ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #: extraneous key [max_tokens] is not permitted#: extraneous key [n] is not permitted, please reformat your input and try again.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 17 (1 by maintainers)

Most upvoted comments

I have a PR #772 that tackles this issue. Almost done…