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

[Workaround] Guardrails for Bedrock Custom Model Endpoints not applied #8226

Open
MarcusRosen-Rio opened this issue Feb 4, 2025 · 0 comments

Comments

@MarcusRosen-Rio
Copy link

Hi,

LiteLLM version: 1.60

When using a Bedrock Custom Model Endpoint the standard guardrail proxy configuration is ignored but adding headers manually from this older issue works

Works:

  • model_name: DeepSeek-R1-Distill-Llama-8B
    litellm_params:
    model: bedrock/llama/arn:aws:bedrock:us-east-1:..:imported-model/...
    extra_headers: {
    "X-Amzn-Bedrock-GuardrailIdentifier": os.environ/BEDROCK_GUARDRAIL_ID_US_EAST_1,
    "X-Amzn-Bedrock-GuardrailVersion": os.environ/BEDROCK_GUARDRAIL_VERSION_US_EAST_1
    }
    aws_region_name: us-east-1

Does not work:

  • model_name: DeepSeek-R1-Distill-Llama-8B
    litellm_params:
    model: bedrock/llama/arn:aws:bedrock:us-east-1:..:imported-model/..
    aws_region_name: us-east-1
    guardrailConfig: {
    "guardrailIdentifier": os.environ/BEDROCK_GUARDRAIL_ID_US_EAST_1, # The identifier (ID) for the guardrail.
    "guardrailVersion": os.environ/BEDROCK_GUARDRAIL_VERSION_US_EAST_1, # The version of the guardrail.
    "trace": "enabled", # The trace behavior for the guardrail. Can either be "disabled" or "enabled"
    }
@MarcusRosen-Rio MarcusRosen-Rio changed the title [Workaround] Guardrails for Bedrock Custom Model Endpoints no applied [Workaround] Guardrails for Bedrock Custom Model Endpoints not applied Feb 4, 2025
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