saoudrizwan / claude-dev

Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.
https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev
MIT License
4.04k stars 381 forks source link

Support Vertex AI #125

Closed simonz4031 closed 2 weeks ago

simonz4031 commented 3 weeks ago

Add support for Google Cloud Vertex AI API

This PR adds support for using the Google Cloud Vertex AI API as a provider in Claude Dev. Users can now interact with Claude models hosted on Google Cloud Vertex AI.

Key changes:

New files:

Modified files:

Testing:

Notes:

fry69 commented 3 weeks ago

I am not the maintainer or otherwise affiliated with Claude Dev, but I see two obvious issues:

Update after looking a bit deeper into both implementations: They seem to be very similar in principle (using the same libraries to authenticate and talk to Vertex AI), but the implementation by @u-minor is more elaborate/secure IMHO, allowing to use Service Account credentials for authentication instead of using the global access token (which potentially gives full access to the main GCP account).

simonz4031 commented 3 weeks ago

I am not the maintainer or otherwise affiliated with Claude Dev, but I see two obvious issues:

  • your pull request is not rebased on the current main branch, it basically replaces the whole repository with your version (with 221 commits)
  • there is already a pull request that implements Vertex AI support for Claude Dev, see here -> Add Vertex AI support #45 how is your version different or better?

Update after looking a bit deeper into both implementations: They seem to be very similar in principle (using the same libraries to authenticate and talk to Vertex AI), but the implementation by @u-minor is more elaborate/secure IMHO, allowing to use Service Account credentials for authentication instead of using the global access token (which potentially gives full access to the main GCP account). Thank you for highlighting the security concern. I'm currently utilizing Google's free 90-day credit offer for this project. In the long term, I believe Anthropic's prompt cache would be more suitable than the Vertex AI solution.

Regarding the pull request (PR), it was actually generated by the extension itself. I must admit my knowledge of TypeScript is limited. When time permits, I plan to update the PR, focusing on rebasing and addressing other minor issues I've identified.

I appreciate your feedback and will work on implementing these improvements to enhance the project's security and functionality.

shimr0d commented 3 weeks ago

Can we agree that the PR of @u-minor is the one we should follow ?