-
-
Notifications
You must be signed in to change notification settings - Fork 296
feat: add Anthropic Claude provider support with flexible authentication #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Summary of ChangesHello @nicdaCosta, 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 significantly enhances the system's LLM capabilities by integrating Anthropic Claude models. The primary goal was to provide robust and flexible support for Anthropic, ensuring compatibility with different user setups, from individual developers using direct API keys to enterprise environments leveraging proxy services or existing Claude Code CLI configurations. This broadens the range of powerful models available for both orchestrator and cypher generation tasks, making the system more versatile and accessible to a wider user base. Highlights
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.
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 adds support for Anthropic Claude models, including flexible authentication methods like direct API keys, proxy services via custom headers, and automatic configuration from Claude Code settings. The implementation is well-structured, with a new AnthropicProvider class, corresponding configuration options, and thorough tests. The documentation in README.md and .env.example is also updated clearly.
My review focuses on a small area of code duplication for parsing custom headers, which can be refactored into a shared utility function for better maintainability. I've also suggested adding a comment to clarify the use of a broad exception catch, in line with the project's coding practices. Additionally, I've ensured that the suggested utility function adheres to the project's rule against docstrings. Overall, this is a great addition that significantly expands the tool's capabilities.
…ethod Updated to extract common method parse headers which can be re-used elsewhere Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
using newly created method as per pr code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Added support for Anthropic models, thus making the current availability OpenAI, Gemini, OLlama, and Anthropic.
I have added support for a new model provider, as well as multiple authentication methods for Anthropic to work for various setups, including the usage of 3rd party key providers like Portkey.ai. The reason for the multiple auth options is to allow for various setups to work, from personal to enterprise solutions.