Codium-ai / pr-agent

🚀CodiumAI PR-Agent: An AI-Powered 🤖 Tool for Automated Pull Request Analysis, Feedback, Suggestions and More! 💻🔍
Apache License 2.0
5.62k stars 518 forks source link

Feature Request - Support Claude3 model via Amazon Bedrock #742

Closed FaranIdo closed 6 months ago

FaranIdo commented 6 months ago

Add support for Claude3 model via Amazon Bedrock.

LiteLLM library already supports it https://github.com/BerriAI/litellm/releases/tag/v1.29.1.

I tried to add it by myself, but the current PR agent repo dependencies on old version of LiteLLM, and it wasn't trivial to update it due to some conflicts with openai library.

mrT23 commented 6 months ago

So adding support for claude3 is equal to upgrading litellm and solving the dependencies?

mrT23 commented 6 months ago

This PR will enable claude3: https://github.com/Codium-ai/pr-agent/pull/746

image

FaranIdo commented 6 months ago

Hi @mrT23 , thanks for the quick response. I tested your branch, and it seems it tries to use the Anthropic direct API. Actually, I wanted to use it via Amazon Bedrock.

Once I adds anthropic.claude-3-sonnet-20240229 to init.py file of the algo folder, I got the following exception: image

mrT23 commented 6 months ago

i don't have access to amazon bedrock, so i cant debug it

read https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#amazon-bedrock and try to understand what's missing, probably a line or two somewhere

FaranIdo commented 6 months ago

I will try figuring it out. By the way, currently, using in the config anthropic.claude-v2 leads to bedrock usage, while claude-2 uses directly the API of Anthropic, which is kind of confusing. You can think about a more effortless user experience for choosing the correct model via Bedrock.

mrT23 commented 6 months ago

This is a clear case where the community should contribute (a.k.a you) all the best