Skip to content

Conversation

@jonathan343
Copy link
Contributor

Summary

The existing integration tests for aws-sdk-bedrock-runtime use the amazon.titan-text-express-v1 foundational model for non-bidirectional-streaming tests. This has recently started throwing the following errors:

smithy_core.exceptions.RetryError: Error is not retryable: This model version has reached the end of its life. Please refer to the AWS documentation for more details.

This PR makes the following updates:

  • amazon.titan-text-express-v1 --> global.amazon.nova-2-lite-v1:0
    • Addresses the exception mentioned above.
  • amazon.nova-sonic-v1:0 --> amazon.nova-2-sonic-v1:0
    • Proactively updating to prevent a similar exception when nova sonic v1 is deprecated in the future.

Testing

  • Copy AWS credentials to the environment
  • Change into the aws-sdk-bedrock-runtime directory
    • cd clients/aws-sdk-bedrock-runtime
  • Create and activate Python 3.12 virtual environment
    • uv venv -p 3.12 && . .venv/bin/activate
  • Install aws-sdk-bedrock-runtime and test dependencies
    • uv pip install . --group test
  • Run integration tests
    • pytest tests/integration

Output:

(aws-sdk-bedrock-runtime) $ pytest tests/integration
============================= test session starts =============================
platform darwin -- Python 3.12.12, pytest-7.4.4, pluggy-1.6.0
rootdir: /Users/gytndd/dev/GitHub/aws-sdk-python/clients/aws-sdk-bedrock-runtime
configfile: pyproject.toml
plugins: asyncio-0.20.3
asyncio: mode=Mode.AUTO
collected 3 items                                                             

tests/integration/test_bidirectional_streaming.py .                     [ 33%]
tests/integration/test_non_streaming.py .                               [ 66%]
tests/integration/test_output_streaming.py .                            [100%]

============================== warnings summary ===============================
tests/integration/test_non_streaming.py::test_converse
tests/integration/test_output_streaming.py::test_converse_stream
  /Users/gytndd/dev/GitHub/aws-sdk-python/clients/aws-sdk-bedrock-runtime/.venv/lib/python3.12/site-packages/aws_sdk_signers/signers.py:794: AWSSDKWarning: Payload signing is enabled. This may result in decreased performance for large request bodies.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================= 3 passed, 2 warnings in 15.07s ========================

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jonathan343 jonathan343 requested a review from a team as a code owner December 23, 2025 18:29
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should think about this a bit more and see if we can get this information without hardcoding the model.

@jonathan343 jonathan343 merged commit e867797 into develop Dec 23, 2025
2 checks passed
@jonathan343 jonathan343 deleted the fix-integ-tests branch December 23, 2025 18:41
@jonathan343
Copy link
Contributor Author

jonathan343 commented Dec 23, 2025

@nateprewitt Are you talking about selecting the model dynamically? Or something else?

If the former, there is a ListFoundationModels API we could potentially use. We can filter results by provider and modality if we want. The responses also contain if the model is active or not. Here is an example:

{'modelArn': 'arn:aws:bedrock:us-west-2::foundation-model/amazon.nova-2-lite-v1:0', 'modelId': 'amazon.nova-2-lite-v1:0', 'modelName': 'Nova 2 Lite', 'providerName': 'Amazon', 'inputModalities': ['TEXT', 'IMAGE', 'VIDEO'], 'outputModalities': ['TEXT'], 'responseStreamingSupported': True, 'customizationsSupported': [], 'inferenceTypesSupported': ['INFERENCE_PROFILE'], 'modelLifecycle': {'status': 'ACTIVE'}}

@nateprewitt
Copy link
Contributor

@jonathan343 yeah if we can filter that byOutputModality to only get Text models, that seems tractable. We may want to do some form of sorting or filtering to ensure somewhat deterministic model choice.

nateprewitt added a commit that referenced this pull request Jan 2, 2026
* Add integration tests for Bedrock Runtime (#37)

* Add integration tests for Transcribe Streaming (#38)

* Update integration tests to use the latest Amazon Nova 2 models (#39)

* Update to latest bedrock-runtime model

* Release: aws-sdk-bedrock-runtime-0.3.0

* Release: AWS SDK Transcribe Streaming 0.3.0

* Release: AWS SDK Sagemaker Runtime HTTP2 0.3.0

* Release: aws-sdk-python 0.3.0

---------

Co-authored-by: Alessandra Romero <24320222+alexgromero@users.noreply.github.com>
Co-authored-by: jonathan343 <43360731+jonathan343@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants