Skip to content

Conversation

richet
Copy link

@richet richet commented Aug 29, 2025

What this does

  • Removes the use of the Invoke endpoint
  • Opens up the use of most of the Bedrock models instead of just having Anthropic.
  • Allows for document uploads on endpoints that dont support it via the Invoke API. e.g. claude-3-haiku

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
  • I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

Related issues

Copy link
Owner

@crmne crmne left a comment

Choose a reason for hiding this comment

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

Adding Converse API is a great idea but this PR has significant issues:

  1. No tests!
  2. Code complexity
  3. It doesn't follow the lead of the other providers in terms of method names, modules, etc.
  4. Overcommit was not installed

@richet richet marked this pull request as draft September 3, 2025 18:57
@richet richet marked this pull request as ready for review September 12, 2025 06:35
@richet richet changed the title WIP - Use Converse API for Bedrock provider Use Converse API for Bedrock provider Sep 12, 2025
@richet
Copy link
Author

richet commented Sep 12, 2025

@crmne Several changes made per your comments. Well tested and ready for review.

Copy link

codecov bot commented Sep 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.57%. Comparing base (4ff2231) to head (2d460e2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #377   +/-   ##
=======================================
  Coverage   84.57%   84.57%           
=======================================
  Files          37       37           
  Lines        1932     1932           
  Branches      499      499           
=======================================
  Hits         1634     1634           
  Misses        298      298           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@crmne crmne left a comment

Choose a reason for hiding this comment

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

This is a big patch @richet so thank you for the effort but there are still significant changes needed:

I still see that the organization of the code, especially in chat.rb, doesn't respect the organization of the other providers. There are a ton of methods there that belong in other modules in a provider implementation. Check the OpenAI provider for an example of what belongs where. I'll resume reviewing it when that's done.

Thank you again for the monumental effort.

@richet
Copy link
Author

richet commented Sep 16, 2025

@crmne Thanks for the review and pushing me to clean this up a bit more. I renamed and cleaned up a lot of the methods to a point where I think its close to what you have in OpenAI.

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