Skip to content

Commit f280928

Browse files
committed
Adds support for Claude 3 models
1 parent e31aed4 commit f280928

File tree

6 files changed

+303
-91
lines changed

6 files changed

+303
-91
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
88

99
### Added
1010

11+
- Adds support for Anthropic's Claude 3 Opus & Sonnet models for GitLens' experimental AI features
1112
- Adds a _Compare with Common (Merge) Base_ command to branches in the _Commit Graph_ and views to review the changes if the selected branch were to be merged by comparing the common ancestor (merge base) with the current branch to the selected branch
1213
- Adds a _Stash All Changes_ command to Source Control repository toolbar (off by default)
1314
- Adds the repository name as a prefix to worktree name when adding to the current workspace

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,12 +3324,16 @@
33243324
"enum": [
33253325
"claude-instant-1",
33263326
"claude-2",
3327-
"claude-2.1"
3327+
"claude-2.1",
3328+
"claude-3-opus-20240229",
3329+
"claude-3-sonnet-20240229"
33283330
],
33293331
"enumDescriptions": [
33303332
"Claude Instant 1.2",
33313333
"Claude 2",
3332-
"Claude 2.1"
3334+
"Claude 2.1",
3335+
"Claude 3 Opus",
3336+
"Claude 3 Sonnet"
33333337
],
33343338
"markdownDescription": "Specifies the Anthropic model to use for GitLens' experimental AI features",
33353339
"scope": "window",

src/ai/aiProviderService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ export function getMaxCharacters(model: OpenAIModels | AnthropicModels, outputLe
245245
case 'gpt-3.5-turbo': // Will point to gpt-3.5-turbo-1106 starting Dec 11, 2023
246246
tokens = 4096;
247247
break;
248-
case 'claude-2.1': // 200,000 tokens
248+
case 'claude-3-opus-20240229': // 200,000 tokens
249+
case 'claude-3-sonnet-20240229':
250+
case 'claude-2.1':
249251
tokens = 200000;
250252
break;
251253
case 'claude-2': // 100,000 tokens

0 commit comments

Comments
 (0)