Skip to content

Add VertexAI Support#92

Merged
tghamm merged 21 commits into
tghamm:mainfrom
therealpaulgg:main
Mar 28, 2025
Merged

Add VertexAI Support#92
tghamm merged 21 commits into
tghamm:mainfrom
therealpaulgg:main

Conversation

@therealpaulgg
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Owner

@tghamm tghamm left a comment

Choose a reason for hiding this comment

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

Some things I'm hoping can be addressed before we get this merged. Happy to work with you on any of the requested changes, and hopefully nothing too onerous.

Comment thread Anthropic.SDK.Tests/VertexAI.ChatClient.cs
Comment thread Anthropic.SDK.Tests/VertexAI.cs
Comment thread Anthropic.SDK.Tests/VertexAIModels.cs Outdated
Comment thread Anthropic.SDK/Messaging/VertexAIMessagesEndpoint.cs Outdated
Comment thread Anthropic.SDK/Models/VertexAIModelsEndpoint.cs Outdated
Comment thread Anthropic.SDK/VertexAIAuthentication.cs
Comment thread README.md Outdated
@therealpaulgg
Copy link
Copy Markdown
Contributor Author

Hey, I resolved your PR feedback.

There are a couple of things I still need to tackle because it looks like the function calls integration tests are failing, but I implemented the suggested changes. Thank you :)

@therealpaulgg
Copy link
Copy Markdown
Contributor Author

and resolved!

@tghamm
Copy link
Copy Markdown
Owner

tghamm commented Mar 27, 2025

Awesome, will take a deeper look today!

@tghamm
Copy link
Copy Markdown
Owner

tghamm commented Mar 28, 2025

@therealpaulgg I'm running into auth errors trying to use the gcloud mechanism on Windows in VS. Essentially the process won't start because in VS land, the PATH is different. Would you be opposed to me making a modification to lean on the Google.Cloud.AIPlatform.V1 in the Tests library to effectively do the same thing? It's a bit more robust and would leave the Auth details to the user essentially. Essentially something like the below:

var credentialGCloud =
    (await GoogleCredential.GetApplicationDefaultAsync()).CreateScoped(
        "https://www.googleapis.com/auth/cloud-platform");
var accessToken = await credentialGCloud.UnderlyingCredential.GetAccessTokenForRequestAsync();

var client = new VertexAIClient(new VertexAIAuthentication(projectId, location, accessToken: accessToken));

@therealpaulgg
Copy link
Copy Markdown
Contributor Author

No problem with that at all, feel free to make any changes needed

@tghamm tghamm merged commit 9ff7b3a into tghamm:main Mar 28, 2025
@nganju98
Copy link
Copy Markdown
Contributor

nganju98 commented Mar 29, 2025 via email

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.

3 participants