Skip to content

feat(rerank): add Bedrock reranking support#141

Merged
adesinah merged 2 commits into
genkit-ai:mainfrom
adesinah:feat/reranking
Jun 19, 2026
Merged

feat(rerank): add Bedrock reranking support#141
adesinah merged 2 commits into
genkit-ai:mainfrom
adesinah:feat/reranking

Conversation

@adesinah

@adesinah adesinah commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

This MR adds Bedrock reranking support. This PR requires #140 to be merged first.

Closes point 2 in #136

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Testing

Please describe the tests that you ran to verify your changes:

  • Unit tests pass (go test ./...)
  • Integration tests pass
  • Manual testing performed
  • Examples still work

Test Configuration

  • Go version:
  • AWS Bedrock models tested:
  • Operating system:

Code Quality

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works

Documentation

  • Updated README.md if needed
  • Updated code comments
  • Added examples if introducing new features
  • Updated API documentation

AWS Bedrock Specific

If this change affects AWS Bedrock functionality:

  • Tested with multiple Bedrock models
  • Verified AWS credential handling
  • Checked error handling for AWS API calls
  • Validated streaming functionality (if applicable)
  • Tested tool calling features (if applicable)

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CLA (if required)
  • My commits follow the conventional commit format
  • I have updated the version number (if applicable)

@adesinah adesinah requested a review from xavidop as a code owner June 18, 2026 12:35

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

Copy link
Copy Markdown

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 refactors the Bedrock plugin into a more modular structure by splitting logic into separate files and introduces a new Rerank helper for document reranking, accompanied by updated documentation and tests. The review feedback suggests using defer for mutex unlocking in the Init method to improve safety and points out that the RequestTimeout configuration field is currently unused and needs to be integrated into API calls.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread bedrock.go
Comment thread bedrock.go
@xavidop

xavidop commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

we should merge this one first or point this one to the previous one

@adesinah

Copy link
Copy Markdown
Contributor Author

we should merge this one first or point this one to the previous one

Absolutely, I mentioned that in the PR's description - I had an issue with Merge access, but it was just resolved now. I will resolve the conflict in the PR shortly

@xavidop

xavidop commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

@adesinah thank you!

@xavidop xavidop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks awesome!

@adesinah adesinah merged commit febe9b6 into genkit-ai:main Jun 19, 2026
9 checks passed
github-actions Bot pushed a commit that referenced this pull request Jun 19, 2026
## [1.15.0](v1.14.1...v1.15.0) (2026-06-19)

### 🚀 Features

* **rerank:** add Bedrock reranking support ([#141](#141)) ([febe9b6](febe9b6))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants