Skip to content

Conversation

@git-hulk
Copy link
Contributor

@git-hulk git-hulk commented Nov 7, 2025

This PR closes #225.

@git-hulk git-hulk force-pushed the feature/anthropic-llm branch from 259afe2 to 0c29587 Compare November 8, 2025 15:47
@git-hulk git-hulk force-pushed the feature/anthropic-llm branch from 0c29587 to 6ec94da Compare November 8, 2025 15:49
@git-hulk git-hulk marked this pull request as ready for review November 8, 2025 15:50
@git-hulk git-hulk changed the title [WIP] Add support of the anthropic model Add support of the anthropic model Nov 8, 2025
@git-hulk
Copy link
Contributor Author

git-hulk commented Nov 8, 2025

Hi @dpasiukevich @mazas-google, I have implemented the first version of supporting the anthropic model, and have the basic test on my side.

Could you please have a look when you get time? I would like to confirm if the direction is correct from the maintainer's perspective, and happy to modify the PR according to your feedback.

@dpasiukevich
Copy link
Collaborator

/gemini review

@dpasiukevich
Copy link
Collaborator

I will try do a proper review tomorrow. Thank you for the contribution!

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 comprehensive support for Anthropic models via Vertex AI, introducing a new anthropic package to adapt the model.LLM interface. The implementation is well-structured, separating request building, response parsing, and the core client logic. It correctly handles both streaming and non-streaming generation and is accompanied by a solid set of tests, including good coverage for the streaming logic. I've identified one high-severity issue concerning the in-place modification of input data, which could lead to unexpected side effects. My detailed comment suggests a safer approach to ensure data immutability. Overall, this is a high-quality contribution.

@git-hulk git-hulk force-pushed the feature/anthropic-llm branch from dfa4215 to 802b98c Compare November 10, 2025 02:40
@git-hulk
Copy link
Contributor Author

@dpasiukevich, could you please take a look at this PR when you get time?

robbyt pushed a commit to robbyt/adk-go that referenced this pull request Nov 16, 2025
This commit integrates the changes from google#233, which adds
comprehensive support for Anthropic's Claude models via the model.LLM
interface.

Key features:
- Support for both streaming and non-streaming generation
- Integration with Vertex AI, Anthropic API, and AWS Bedrock providers
- Tool/function calling with proper schema conversion
- Handles multiple content types (text, images, code execution)
- Comprehensive test coverage

Changes include:
- New model/anthropic package with core implementation
- Request/response builders for API translation
- Provider selection (vertex_ai, anthropic, aws_bedrock)
- Dependencies: anthropic-sdk-go v1.17.0 and tidwall utilities

All code has been formatted with go fmt, passes go vet checks,
and all tests pass successfully.

Original PR: google#233
Author: git-hulk <[email protected]>
robbyt pushed a commit to robbyt/adk-go that referenced this pull request Nov 16, 2025
This document provides a detailed technical comparison of how the
integrated PR google#233 code uses the Anthropic SDK versus how the
Charm Fantasy library implements similar functionality.

Key findings:
- Both use the official anthropic-sdk-go correctly
- Fantasy has more production features (caching, advanced streaming)
- ADK-Go is simpler and well-suited for basic Vertex AI usage
- Identifies potential improvements for future iterations

This analysis helps understand the tradeoffs and implementation
patterns for Anthropic SDK integration in Go.
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.

When is the plan to support the Claude model?

2 participants