Issues with specifying Amazon Bedrock Guardrails #8028
Replies: 3 comments
-
|
I'm experiencing a similar issue with bedrock guardrail config - but the error is slightly different. |
Beta Was this translation helpful? Give feedback.
-
This looks like it's from bedrock API "{"message":"The model returned the following errors: The guardrail identifier or version provided in the request does not exist."}" Are you sure you are specifying the right ID and version ? |
Beta Was this translation helpful? Give feedback.
-
|
A couple of things to check with Bedrock Guardrails:
guardrailConfig={"guardrailIdentifier": "mts5z4bj1570", "guardrailVersion": "DRAFT", "trace": "enabled"}vs the ARN format. Try both the short ID and full ARN.
If you're still hitting issues, try calling the Bedrock API directly (bypassing LiteLLM) with the same guardrail config to isolate whether it's a LiteLLM formatting issue or an AWS-side config problem. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to use litellm with Amazon Bedrock. However, I seem to do something wrong specifying Bedrock Guardrails.
In my code, I use the bedrock client of boto3 to list_guardrails and have my desired one here:
However, when I try to use it, I get
The prompt works when I remove the guardrailConfig. The completion call:
I'm using highly privileged credentials here - in fact the same ones that I used to create the Guardrail in the first place. Should not be a permission error.
Any idea what my issue might be here and how to resolve it?
Beta Was this translation helpful? Give feedback.
All reactions