-
Notifications
You must be signed in to change notification settings - Fork 642
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
botocore: add basic handling for bedrock invoke.model #3200
base: main
Are you sure you want to change the base?
Conversation
|
||
@pytest.fixture(scope="module", autouse=True) | ||
def fixture_vcr(vcr): | ||
vcr.register_serializer("yaml", PrettyPrintJSONBody) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to remove this because botocore is validating the response against the content-length, after updating the header in scrub_response_headers it was still failing saying that didn't find a matching cassette... reporting no failing matchers. After trying to understand what was going on I've preferred to sacrifice the cassettes readability over my sanity.
@@ -66,7 +64,7 @@ def environment(): | |||
if not os.getenv("AWS_SESSION_TOKEN"): | |||
os.environ["AWS_SESSION_TOKEN"] = "test_aws_session_token" | |||
if not os.getenv("AWS_DEFAULT_REGION"): | |||
os.environ["AWS_DEFAULT_REGION"] = "eu-central-1" | |||
os.environ["AWS_DEFAULT_REGION"] = "us-east-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some models are not available in europe :)
Looks good to me, thanks |
Description
Handle the invokeModel operation in the bedrock extension of the botocore instrumentation for a bunch of models from Amazon and Anthropic. The API changes between models and so we need custom code for each model 😭 . We are tracing a bunch of request and response params that are available in all models. Next batch of changes will add tracing for the streaming versions of the Converse and InvokeModel.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.