This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Update Cody Bedrock support to use Anthropic messages API#61347
Merged
Conversation
philipp-spiess
approved these changes
Mar 25, 2024
Contributor
There was a problem hiding this comment.
Should probably also copy the tests over, grep for TestLegacyMessageConversion
Contributor
There was a problem hiding this comment.
@philipp-spiess Thats a good pointer and I covered it.
815efaf to
cd07216
Compare
arafatkatze
approved these changes
Mar 25, 2024
arafatkatze
left a comment
Contributor
There was a problem hiding this comment.
- Tested on different models of anthropic(both version 2 and 3) using AWS Bedrock
- Fixed the test locations
cd07216 to
7b44a46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the Bedrock provider to Anthropic's Messages API which includes support for the Claude 3 models.
Much of this is very close to duplication between the Anthropic and Bedrock providers, I considered consolidating but they are running different Anthropic api versions and imagine that they may diverge more in the future so the small amount of duplication does not feel overly burdensome.
Test plan
BYOK Setup (Claude 2 & Claude Instant 1.2)
With legacy request
streaming ✅
not streaming ✅
code-completions ✅
With V1 request
streaming ✅
non streaming ✅
code-completions ✅
Using Claude 3
Chat

Autocomplete

Commands
