feat: add script for troubleshooting bedrock
What does this merge request do and why?
IMPORTANT: Dependant on the changes in feat: fixes self-provided claude_3 prompt (!1444 - merged)
Why?
For gitlab-org/gitlab#495057 (closed)
Now that we are providing support for Bedrock as a provider, it is necessary to verify that the connection to Bedrock is authenticated successfully during the troubleshooting process:
For this, we extend the troubleshooting script in this MR, such that:
- We verify that the ENV variables required for Bedrock, ie,
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_REGION_NAME
are present. - We also trigger a request to Bedrock to authenticate that the credentials set in the above ENV variables are indeed valid.
Screenshots
Usage
Locally, with all the required variables set on my terminal window:
poetry run scripts/troubleshoot_selfhosted_installation.py --model-name claude_3 --model-identifier bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0
Required variables are: AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
, AWS_REGION_NAME
, AIGW_CUSTOM_MODELS__ENABLED: true
, AIGW_AUTH__BYPASS_EXTERNAL: true
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Manoj M J