Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 99968a6

Browse files
authored
fix(cody-gateway): update model id for claude 3.5 sonnet (#63400)
<!-- 💡 To write a useful PR description, make sure that your description covers: - WHAT this PR is changing: - How was it PREVIOUSLY. - How it will be from NOW on. - WHY this PR is needed. - CONTEXT, i.e. to which initiative, project or RFC it belongs. The structure of the description doesn't matter as much as covering these points, so use your best judgement based on your context. Learn how to write good pull request description: https://www.notion.so/sourcegraph/Write-a-good-pull-request-description-610a7fd3e613496eb76f450db5a49b6e?pvs=4 --> Update Claude 3.5 model id to claude-3-5-sonnet-20240620 ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> NA ## Changelog <!-- 1. Ensure your pull request title is formatted as: $type($domain): $what 2. Add bullet list items for each additional detail you want to cover (see example below) 3. You can edit this after the pull request was merged, as long as release shipping it hasn't been promoted to the public. 4. For more information, please see this how-to https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c? Audience: TS/CSE > Customers > Teammates (in that order). Cheat sheet: $type = chore|fix|feat $domain: source|search|ci|release|plg|cody|local|... --> <!-- Example: Title: fix(search): parse quotes with the appropriate context Changelog section: ## Changelog - When a quote is used with regexp pattern type, then ... - Refactored underlying code. -->
1 parent 1a6a7f7 commit 99968a6

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

cmd/cody-gateway-config/dotcom_models.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func getAnthropicModels() []types.Model {
6464
// Pro Anthropic models.
6565
newModel(
6666
modelIdentity{
67-
MRef: mRef(anthropic_06_2023, "claude-3.5-sonnet"),
68-
Name: "claude-3.5-sonnet-20240620",
67+
MRef: mRef(anthropic_06_2023, "claude-3-5-sonnet"),
68+
Name: "claude-3-5-sonnet-20240620",
6969
DisplayName: "Claude 3.5 Sonnet",
7070
},
7171
modelMetadata{

internal/completions/client/anthropic/anthropic.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ import (
1414
"github.com/sourcegraph/sourcegraph/lib/errors"
1515
)
1616

17+
// Anthropic model: https://docs.anthropic.com/en/docs/about-claude/models
1718
const Claude3Haiku = "claude-3-haiku-20240307"
1819
const Claude3Sonnet = "claude-3-sonnet-20240229"
1920
const Claude3Opus = "claude-3-opus-20240229"
20-
const Claude35Sonnet = "claude-3.5-sonnet-20240620"
21+
const Claude35Sonnet = "claude-3-5-sonnet-20240620"
2122

2223
func NewClient(cli httpcli.Doer, apiURL, accessToken string, viaGateway bool, tokenManager tokenusage.Manager) types.CompletionsClient {
2324

internal/modelconfig/embedded/models.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
},
3737
{
3838
"modelId": "unknown",
39-
"modelRef": "anthropic::2023-06-01::claude-3.5-sonnet",
39+
"modelRef": "anthropic::2023-06-01::claude-3-5-sonnet",
4040
"displayName": "Claude 3.5 Sonnet",
41-
"string": "claude-3.5-sonnet-20240620",
41+
"string": "claude-3-5-sonnet-20240620",
4242
"capabilities": ["chat", "edit"],
4343
"category": "accuracy",
4444
"status": "stable",

0 commit comments

Comments
 (0)