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

Bedrock Claude model invocation gives error: "extraneous key [stream] is not permitted" #543

Closed
rolfwilms opened this issue May 25, 2024 · 2 comments

Comments

@rolfwilms
Copy link
Contributor

Describe the bug
Invoking any AWS Bedrock Claude model gives the following error:

Failed to get answer

Caused by:
Malformed input request: #: subject must not be valid against schema {"required":["messages"]}#: extraneous key [stream] is not permitted, please reformat your input and try again.

To Reproduce
Configure Bedrock, select an AWS Bedrock Claude model, e.g. Sonnet, then run any query,

Expected behavior
Expecting a model response, not an error.

Configuration

model claude:claude-3-haiku-20240307
max_output_tokens 4096 (current model)
temperature 1
top_p -
function_calling false
compress_threshold 100000
dry_run false
save true
save_session -
highlight true
light_theme false
wrap no
wrap_code false
auto_copy false
keybindings emacs
prelude
config_file C:\Users\rwilms\AppData\Roaming\aichat\config.yaml
roles_file C:\Users\rwilms\AppData\Roaming\aichat\roles.yaml
messages_file C:\Users\rwilms\AppData\Roaming\aichat\messages.md
sessions_dir C:\Users\rwilms\AppData\Roaming\aichat\sessions
functions_dir C:\Users\rwilms\AppData\Roaming\aichat\functions

Environment (please complete the following information):

  • os version: MSYS_NT-10.0-22631 winvm1 3.1.7-340.x86_64 2020-10-23 13:08 UTC x86_64 Msys
  • aichat version: aichat 0.17.0
  • terminal version: not sure, probably not relevant

Additional context
Actually using master as of 2024-05-25, but 0.17.0 gives the same error.
I'll try to provide a pull request which removes the key 'stream'.

@rolfwilms
Copy link
Contributor Author

Added pull request #544 for this issue. It also fixes too high default max_output_tokens with AWS Bedrock Meta llama-3 models.

@sigoden sigoden closed this as completed May 25, 2024
@sigoden
Copy link
Owner

sigoden commented May 25, 2024

Thank you for your contribution.

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

2 participants