continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
18.64k stars 1.56k forks source link

Recent bedrock integration throwing an error about system role messge getting passed. #1938

Open digitalneedstech opened 2 months ago

digitalneedstech commented 2 months ago

Before submitting your bug report

Relevant environment info

- OS:
- Continue:
- IDE:
- Model:
- config.json:

Description

Recent bedrock integration throwing an error about system role messge getting passed.

When a prompt is sent to aws bedrock along with system message setup in config.json.

An error is thrown back that says role type system is not allowed when calling bedrock api.

To reproduce

  1. Go to config.json
  2. Configure basic bedrock config along with system message.
  3. Type a prompt and click send
  4. Error is received and added in log output section.

Log output

_ValidationException: 1 validation error detected: Value 'system' at 'messages.1.member.role' failed to satisfy constraint: Member must satisfy enum value set: [user, assistant]_
digitalneedstech commented 2 months ago

PR raised at https://github.com/continuedev/continue/pull/1951