refactor(py): rename aws-bedrock plugin to amazon-bedrock#4448
refactor(py): rename aws-bedrock plugin to amazon-bedrock#4448
Conversation
BREAKING CHANGE: The aws-bedrock plugin has been renamed to amazon-bedrock. This is a pre-publish rename to use the correct 'Amazon Bedrock' service name. Changes: - Renamed plugin directory: plugins/aws-bedrock -> plugins/amazon-bedrock - Renamed Python package: aws_bedrock -> amazon_bedrock - Renamed sample: aws-bedrock-hello -> amazon-bedrock-hello - Updated PyPI package name: genkit-plugin-aws-bedrock -> genkit-plugin-amazon-bedrock - Updated model prefix: aws-bedrock/ -> amazon-bedrock/ - Updated AWSBedrock class to AmazonBedrock - Updated AWS_BEDROCK_PLUGIN_NAME to AMAZON_BEDROCK_PLUGIN_NAME - Updated all documentation and references Migration for users: - from genkit.plugins.aws_bedrock import AWSBedrock + from genkit.plugins.amazon_bedrock import AmazonBedrock - pip install genkit-plugin-aws-bedrock + pip install genkit-plugin-amazon-bedrock - model='aws-bedrock/anthropic.claude-sonnet-4-5...' + model='amazon-bedrock/anthropic.claude-sonnet-4-5...'
Summary of ChangesHello @yesudeep, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a significant renaming of the 'aws-bedrock' plugin to 'amazon-bedrock'. This change is crucial for aligning the plugin's nomenclature with the official 'Amazon Bedrock' service name, ensuring consistency and avoiding potential future deprecation issues, especially before the upcoming v0.5.0 PyPI release. The refactor impacts various aspects of the plugin, from its internal structure and code references to external facing elements like package names and documentation, requiring users to adapt their existing integrations. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is a comprehensive refactoring to rename the aws-bedrock plugin to amazon-bedrock, aligning with the official service name. The changes are extensive, touching documentation, configuration files, and source code across the Python workspace. The renaming has been executed thoroughly and consistently. All file renames, package name changes in pyproject.toml files, and identifier updates (class names, constants, module paths) appear correct. The PR is well-documented with a clear summary of the breaking changes. I have reviewed all the changes and found no issues. This is a great cleanup before the PyPI publish.
Combines the aws plugin (X-Ray telemetry) into the amazon-bedrock plugin to provide both model access AND observability in a single package. Changes: - Move telemetry/ module from plugins/aws to plugins/amazon-bedrock - Add add_aws_telemetry() export to amazon-bedrock plugin - Add OpenTelemetry telemetry dependencies to amazon-bedrock pyproject.toml - Update amazon-bedrock-hello sample to enable X-Ray telemetry - Remove standalone aws plugin and aws-hello sample - Update plugins README to reflect merged plugin - Add community plugin disclaimer to documentation Rationale: Users on AWS typically want both Bedrock models AND X-Ray tracing. Consolidating into one plugin simplifies installation and reduces dependency management complexity. BREAKING CHANGE: genkit-plugin-aws is removed. Users should use genkit-plugin-amazon-bedrock and import add_aws_telemetry from genkit.plugins.amazon_bedrock instead of genkit.plugins.aws.
Adds comprehensive unit tests for the AWS X-Ray telemetry functionality that was merged into the amazon-bedrock plugin. Tests cover: - Region resolution from environment variables - X-Ray OTLP endpoint configuration - AwsXRayOtlpExporter with SigV4 authentication - SigV4SigningAdapter for HTTPS requests - AwsTelemetry manager class - TimeAdjustedSpan for zero-duration spans - add_aws_telemetry function export from plugin Also updates py/README.md with: - Complete directory structure - Plugin categories table - Community plugin documentation - Development quickstart
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request is a large-scale refactoring that renames the aws-bedrock plugin to amazon-bedrock to align with the official service name. It also correctly merges the aws telemetry plugin into the new amazon-bedrock plugin, consolidating model access and X-Ray telemetry into a single package. The changes are extensive, touching many documentation files, configuration files, and source code. The renaming appears to be consistent and thorough across the entire codebase. The merge of the telemetry plugin is also handled well, with updates to dependencies, tests, and documentation. Overall, this is a solid refactoring that improves consistency and simplifies the plugin structure for AWS services. I have one suggestion to improve the clarity of a diagram in the documentation.
Addresses review feedback from gemini-code-assist to avoid listing amazon-bedrock twice in the plugin ecosystem diagram. Now shows amazon-bedrock with both model and X-Ray telemetry capabilities in a single entry.
|
Addressed the review feedback from @gemini-code-assist regarding the diagram. The amazon-bedrock plugin is now shown in a single consolidated entry with both model providers and X-Ray telemetry capabilities. |
|
Thanks for the update, @yesudeep! I've reviewed the changes in |
CI StatusThe Python 3.13 and 3.14 test failures are not related to this PR. They occur in All tests in this PR's scope pass:
The xai plugin test failure should be addressed in a separate PR. |
The test_streaming_generation test was failing intermittently because it uses loop.call_soon_threadsafe() to schedule chunk callbacks, but the test assertions ran before the event loop processed these callbacks. Added asyncio.sleep(0.1) after generate() to allow the event loop to process the scheduled call_soon_threadsafe callbacks before asserting the collected chunks.
|
Update: Fixed the flaky xai streaming test that was causing Python 3.13/3.14 CI failures. The All tests should now pass across Python 3.10-3.14. |
Summary
This PR renames the
aws-bedrockplugin toamazon-bedrock, merges AWS X-Ray telemetry functionality into the plugin, and removes the redundant standaloneawsplugin.BREAKING CHANGES
Package Name
Import Path
AWS Telemetry Import
Model Names
Changes
Plugin Rename
plugins/aws-bedrock→plugins/amazon-bedrockgenkit-plugin-aws-bedrock→genkit-plugin-amazon-bedrockaws_bedrock→amazon_bedrockAWSBedrock→AmazonBedrockAWS Telemetry Merge
telemetry/module fromplugins/awstoplugins/amazon-bedrockadd_aws_telemetry()export to amazon-bedrock plugingenkit-plugin-awspluginSample Updates
samples/aws-bedrock-hello→samples/amazon-bedrock-hellosamples/aws-hello(functionality merged into amazon-bedrock-hello)Documentation
Testing
Verified Against AWS Docs
https://xray.{region}.amazonaws.com/v1/traces✅1-{8-char-timestamp}-{24-char-random}✅Usage Example
Rationale