Skip to content

refactor(py): rename aws-bedrock plugin to amazon-bedrock#4448

Merged
yesudeep merged 6 commits intomainfrom
yesudeep/rename/aws-bedrock-to-amazon-bedrock
Feb 4, 2026
Merged

refactor(py): rename aws-bedrock plugin to amazon-bedrock#4448
yesudeep merged 6 commits intomainfrom
yesudeep/rename/aws-bedrock-to-amazon-bedrock

Conversation

@yesudeep
Copy link
Contributor

@yesudeep yesudeep commented Feb 4, 2026

Summary

This PR renames the aws-bedrock plugin to amazon-bedrock, merges AWS X-Ray telemetry functionality into the plugin, and removes the redundant standalone aws plugin.

Community Plugin – This plugin is maintained by the community and is supported on a best-effort basis. It is not an official AWS product.

BREAKING CHANGES

Package Name

- pip install genkit-plugin-aws-bedrock
+ pip install genkit-plugin-amazon-bedrock

Import Path

- from genkit.plugins.aws_bedrock import AWSBedrock
+ from genkit.plugins.amazon_bedrock import AmazonBedrock

AWS Telemetry Import

- from genkit.plugins.aws import add_aws_telemetry
+ from genkit.plugins.amazon_bedrock import add_aws_telemetry

Model Names

- model="aws-bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"
+ model="amazon-bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"

Changes

Plugin Rename

  • Directory: plugins/aws-bedrockplugins/amazon-bedrock
  • Package: genkit-plugin-aws-bedrockgenkit-plugin-amazon-bedrock
  • Module: aws_bedrockamazon_bedrock
  • Class: AWSBedrockAmazonBedrock

AWS Telemetry Merge

  • Moved telemetry/ module from plugins/aws to plugins/amazon-bedrock
  • Added add_aws_telemetry() export to amazon-bedrock plugin
  • Added OpenTelemetry dependencies for X-Ray support
  • Removed standalone genkit-plugin-aws plugin

Sample Updates

  • Renamed samples/aws-bedrock-hellosamples/amazon-bedrock-hello
  • Removed samples/aws-hello (functionality merged into amazon-bedrock-hello)
  • Updated sample to enable X-Ray telemetry by default

Documentation

  • Updated plugins/README.md to reflect merged plugin
  • Updated py/README.md with directory structure
  • Added community plugin disclaimer to all relevant docs
  • Added X-Ray telemetry section to plugin README

Testing

Test Suite Count Status
amazon-bedrock plugin tests 82 ✅ Passed
amazon-bedrock telemetry tests 33 ✅ Passed (new)
Full pytest suite 1,161 ✅ Passed

Verified Against AWS Docs

  • X-Ray OTLP endpoint pattern: https://xray.{region}.amazonaws.com/v1/traces
  • X-Ray trace ID format: 1-{8-char-timestamp}-{24-char-random}
  • SigV4 authentication: Required for X-Ray endpoint ✅

Usage Example

from genkit import Genkit
from genkit.plugins.amazon_bedrock import (
    AmazonBedrock,
    add_aws_telemetry,
    claude_sonnet_4_5,
)

# Enable X-Ray telemetry
add_aws_telemetry(region="us-east-1")

# Use Bedrock models
ai = Genkit(
    plugins=[AmazonBedrock(region="us-east-1")],
    model=claude_sonnet_4_5,
)

response = await ai.generate(prompt="Tell me a joke")

Rationale

  1. Correct naming: "Amazon Bedrock" is the official AWS service name
  2. Consolidation: Users on AWS typically want both Bedrock models AND X-Ray tracing
  3. Simplified installation: One plugin instead of two
  4. Pre-publish: Rename done before v0.5.0 PyPI publish to avoid deprecation

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...'
@github-actions github-actions bot added docs Improvements or additions to documentation python Python config labels Feb 4, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Plugin Renaming: The aws-bedrock plugin has been comprehensively renamed to amazon-bedrock across the entire codebase. This includes changes to the plugin's directory structure, package name (genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock), module names, class names (AWSBedrock to AmazonBedrock), and constants (AWS_BEDROCK_PLUGIN_NAME to AMAZON_BEDROCK_PLUGIN_NAME).
  • Breaking Change: This rename constitutes a breaking change. Users will need to update their pip install commands, Python import paths, and model identifiers to reflect the new amazon-bedrock naming convention.
  • Documentation and Samples Update: All relevant documentation files (CHANGELOG.md, READMEs, GEMINI.md, engdoc planning documents) and sample applications (aws-bedrock-hello to amazon-bedrock-hello) have been updated to align with the new plugin name.

🧠 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
  • py/.github/PR_DESCRIPTION_0.5.0.md
    • Updated the plugin name from genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock in the release description table.
  • py/CHANGELOG.md
    • Updated the plugin name from genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock in the 'New Model Provider Plugins' section.
  • py/GEMINI.md
    • Updated references to the plugin directory from plugins/aws-bedrock/ to plugins/amazon-bedrock/.
    • Renamed plugin mentions from aws-bedrock to amazon-bedrock in the 'Changes' and 'Test Plan' sections.
    • Updated package names from genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock in the 'Package Category' table.
  • py/bin/fix_package_metadata.py
    • Updated the PLUGIN_KEYWORDS dictionary to use amazon-bedrock instead of aws-bedrock.
  • py/engdoc/blog-genkit-python-0.5.0.md
    • Updated plugin names in the 'Model Provider' table and pip install command examples.
  • py/engdoc/parity-analysis/roadmap.md
    • Updated plugin names in various tables and sections related to feature comparison and gap analysis.
  • py/engdoc/planning/FEATURE_MATRIX.md
    • Updated plugin names in the 'Feature Comparison' and 'Plugin API Type' tables.
  • py/engdoc/planning/README.md
    • Updated the example model plugin name from aws-bedrock to amazon-bedrock.
  • py/engdoc/planning/vercel-plugins.md
    • Updated the AI Plugin name from aws-bedrock to amazon-bedrock in the platform table.
  • py/engdoc/release-publishing-guide.md
    • Updated the plugin name in the list of 'New packages' and pip install examples.
  • py/mkdocs.yml
    • Updated the plugin source path from plugins/aws-bedrock/src to plugins/amazon-bedrock/src.
  • py/plugins/README.md
    • Updated the plugin name in the ASCII art diagram, usage examples, feature table, environment variables table, and installation instructions.
  • py/plugins/aws-bedrock/LICENSE
    • File renamed to py/plugins/amazon-bedrock/LICENSE.
  • py/plugins/aws-bedrock/README.md
    • File renamed to py/plugins/amazon-bedrock/README.md.
    • Updated all references from 'AWS Bedrock' to 'Amazon Bedrock' in the title, description, documentation links, installation instructions, setup options, and code examples.
    • Changed genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock.
  • py/plugins/aws-bedrock/pyproject.toml
    • File renamed to py/plugins/amazon-bedrock/pyproject.toml.
    • Updated description to 'Genkit Amazon Bedrock Plugin'.
    • Updated name to genkit-plugin-amazon-bedrock.
    • Updated only-include path to src/genkit/plugins/amazon_bedrock.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/init.py
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/__init__.py.
    • Updated references to AWSBedrock class to AmazonBedrock.
    • Updated AWS_BEDROCK_PLUGIN_NAME to AMAZON_BEDROCK_PLUGIN_NAME.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/models/init.py
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/models/__init__.py.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/models/model.py
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/models/model.py.
    • Updated model ID prefixes from aws-bedrock/ to amazon-bedrock/.
    • Updated import path for BedrockConfig.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/models/model_info.py
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/models/model_info.py.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/plugin.py
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/plugin.py.
    • Updated references to AWSBedrock class to AmazonBedrock.
    • Updated AWS_BEDROCK_PLUGIN_NAME to AMAZON_BEDROCK_PLUGIN_NAME.
    • Updated import paths for internal modules.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/py.typed
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/py.typed.
  • py/plugins/aws-bedrock/src/genkit/plugins/aws_bedrock/typing.py
    • File renamed to py/plugins/amazon-bedrock/src/genkit/plugins/amazon_bedrock/typing.py.
  • py/plugins/aws-bedrock/src/genkit/py.typed
    • File renamed to py/plugins/amazon-bedrock/src/genkit/py.typed.
  • py/plugins/aws-bedrock/tests/aws_bedrock_plugin_test.py
    • File renamed to py/plugins/amazon-bedrock/tests/amazon_bedrock_plugin_test.py.
    • Updated import paths for the plugin.
    • Updated assertions for bedrock_name, bedrock_model, and predefined model references to reflect amazon-bedrock.
    • Updated the plugin name constant assertion to AMAZON_BEDROCK_PLUGIN_NAME.
  • py/pyproject.toml
    • Updated the dependency from genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock.
    • Updated the uv.sources entry for the sample from aws-bedrock-hello to amazon-bedrock-hello.
    • Updated the uv.sources entry for the plugin from genkit-plugin-aws-bedrock to genkit-plugin-amazon-bedrock.
    • Updated the root workspace path from plugins/aws-bedrock/src to plugins/amazon-bedrock/src.
  • py/samples/README.md
    • Updated the sample name in the directory overview, feature table, and environment variable configuration sections.
  • py/samples/aws-bedrock-hello/LICENSE
    • File renamed to py/samples/amazon-bedrock-hello/LICENSE.
  • py/samples/aws-bedrock-hello/README.md
    • File renamed to py/samples/amazon-bedrock-hello/README.md.
    • Updated all references from 'AWS Bedrock' to 'Amazon Bedrock' in the title, description, prerequisites, setup options, and resources.
    • Changed genkit.plugins.aws_bedrock imports to genkit.plugins.amazon_bedrock.
  • py/samples/aws-bedrock-hello/pyproject.toml
    • File renamed to py/samples/amazon-bedrock-hello/pyproject.toml.
    • Updated dependencies to genkit-plugin-amazon-bedrock.
    • Updated description to 'Amazon Bedrock Hello Sample'.
    • Updated name to amazon-bedrock-hello.
    • Updated uv.sources entry to genkit-plugin-amazon-bedrock.
  • py/samples/aws-bedrock-hello/run.sh
    • File renamed to py/samples/amazon-bedrock-hello/run.sh.
  • py/samples/aws-bedrock-hello/src/main.py
    • File renamed to py/samples/amazon-bedrock-hello/src/main.py.
    • Updated AWSBedrock() to AmazonBedrock() in plugin initialization.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/publish_python.yml
Activity
  • All 82 plugin tests have passed successfully, ensuring the functionality of the renamed plugin.
  • The uv sync command completed without issues, indicating proper dependency resolution.
  • A thorough check confirmed that no remaining aws-bedrock references exist in Python or TOML files, validating the completeness of the rename.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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
@yesudeep
Copy link
Contributor Author

yesudeep commented Feb 4, 2026

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.
@yesudeep
Copy link
Contributor Author

yesudeep commented Feb 4, 2026

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.

@gemini-code-assist
Copy link
Contributor

Thanks for the update, @yesudeep! I've reviewed the changes in py/plugins/README.md and can confirm that the diagram now clearly shows the amazon-bedrock plugin as a consolidated entry, including both model providers and X-Ray telemetry capabilities. This looks great and addresses the feedback effectively.

@yesudeep
Copy link
Contributor Author

yesudeep commented Feb 4, 2026

CI Status

The Python 3.13 and 3.14 test failures are not related to this PR. They occur in plugins/xai/tests/xai_models_test.py::test_streaming_generation which is a pre-existing flaky test in the xai plugin.

All tests in this PR's scope pass:

  • ✅ Python 3.10: 1143 passed
  • ✅ Python 3.11: 1143 passed
  • ✅ Python 3.12: 1143 passed
  • ✅ All type checks (ty, pyrefly, pyright): pass
  • ✅ Lint and Format: pass
  • ✅ Security and Compliance: 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.
@yesudeep
Copy link
Contributor Author

yesudeep commented Feb 4, 2026

Update: Fixed the flaky xai streaming test that was causing Python 3.13/3.14 CI failures.

The test_streaming_generation test was failing because loop.call_soon_threadsafe() schedules callbacks that weren't processed before the assertions ran. Added asyncio.sleep(0.1) to allow the event loop to process these scheduled callbacks.

All tests should now pass across Python 3.10-3.14.

@yesudeep yesudeep merged commit 8acd6b0 into main Feb 4, 2026
17 checks passed
@yesudeep yesudeep deleted the yesudeep/rename/aws-bedrock-to-amazon-bedrock branch February 4, 2026 23:25
@yesudeep yesudeep mentioned this pull request Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config docs Improvements or additions to documentation python Python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants