aws-samples / aws-samples/connect-contact-flow-comparison-github-action
Hardcoded Bedrock model `claude-3-5-sonnet-20241022-v2:0` has been retired — action fails with ResourceNotFoundException
- Dominant language
- Python
- Stars
- 9
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The hardcoded Bedrock `modelId` in `src/bedrock_utils.py` points at a Claude model version that AWS has end-of-lifed. Any workflow using this action now fails at `InvokeModel` time, making the action unusable out of the box.
## Error
```
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the InvokeModel operation: This model version has reached the end of its life. Please refer to the AWS documentation for more details.
```
Traceback ends at:
```
File ".../src/bedrock_utils.py", line 237, in invoke_bedrock_with_retries
response = bedrock_runtime.invoke_model(
```
## Root cause
In [`src/bedrock_utils.py`](https://github.com/aws-samples/connect-contact-flow-comparison-github-action/blob/main/src/bedrock_utils.py), the `invoke_bedrock_with_retries` function hardcodes:
```python
modelId=f"arn:aws:bedrock:us-east-1:{account_id}:inference-profile/us.anthropic.claude-3-5-sonnet-20241022-v2:0"
```
Claude 3.5 Sonnet v2 (`20241022-v2:0`) has reached end-of-life on Bedrock. Since there's no input on `action.yml` to override the model, every consumer hits this failure.
## Requested changes
1. **Update the default model** to a currently-supported Anthropic model on Bedrock, e.g.:
- `us.anthropic.claude-sonnet-4-5-20250929-v1:0`, or
- `us.anthropic.claude-3-7-sonnet-20250219-v1:0`
2. **Expose `model_id` as an optional input** in `action.yml` so consumers can pin/override without forking. Default it to the value chosen in (1).
3. Consider cutting a release tag (e.g. `v1`) so consumers can pin to an immutable ref instead of `@main`.
## Impact
The repo's last commit is from 2025-02-04, and there are no releases or tags, so `@main` is the only usable ref — and it's currently broken for all consumers. A small patch would restore the action for everyone using it.
Happy to open a PR if that helps.
Contributor guide
Assessment
This issue has not been assessed yet.