Feat/anthropic#10
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… support Create the Anthropic adapter structure with support for both Anthropic API and Vertex AI backends. Includes request/response adaptation logic, message history management, and extended thinking configuration. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> fix(anthropic): add nil check for tool responses and fix variable scope in adaptRequest test(anthropic): add adapter tests for request adaptation and backend configuration feat(anthropic): complete anthropic sdk adapter implementation Implement full Anthropic SDK adapter with: - Fixed API compatibility issues with anthropic-sdk-go v1.27.0 - Proper request/response adaptation using SDK types - Support for system prompts via message roles - Tool support with proper input schema handling - Thinking budget token configuration for extended thinking - Both Anthropic and Vertex AI backend support - Comprehensive test coverage Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> fix(anthropic): only set MaxTokens if explicitly provided to support Vertex AI fix fix lint rm test file that's not useful and breaks in CI
28b4926 to
4c3ca78
Compare
| opts := []option.RequestOption{ | ||
| vertex.WithGoogleAuth(p.vertexCtx, p.region, p.project), | ||
| } | ||
|
|
There was a problem hiding this comment.
Is it necessary to inject the Http client from the adapter?
if adapter.HttpClient() != nil {
opts = append(opts, option.WithHTTPClient(adapter.HttpClient()))
}
There was a problem hiding this comment.
That's a valid question and I must confess here I'm unsure about the implication in the SDK.
It looks like yes, it would make sense ?
But I'm not sure what happens if we dont.
There was a problem hiding this comment.
ok, I checked this and if we pass a http client, it overrides the http client with google credentials that the anthropic SDK generates using "WithGoogleAuth"
Add the option for Anthropic model provider, either with aistudio or anthropic backend.