Skip to content

Commit 7a5731e

Browse files
committed
feat: sonnet 4 5 updates and 3 5 deprecation
1 parent 7cadef6 commit 7a5731e

File tree

19 files changed

+256
-146
lines changed

19 files changed

+256
-146
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ body:
2828
- **OS**: macOS
2929
- **Continue version**: v0.9.4
3030
- **IDE version**: VSCode 1.85.1
31-
- Model: Claude Sonnet 3.5
31+
- Model: Claude Sonnet 4.5
3232
- Agent configuration
3333
value: |
3434
- OS:

core/config/workspace/workspaceBlocks.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import {
22
BlockType,
33
ConfigYaml,
4-
createRuleMarkdown,
54
createPromptMarkdown,
6-
RULE_FILE_EXTENSION,
5+
createRuleMarkdown,
76
} from "@continuedev/config-yaml";
87
import * as YAML from "yaml";
98
import { IDE } from "../..";
@@ -41,9 +40,9 @@ function getContentsForNewBlock(blockType: BlockType): ConfigYaml {
4140
configYaml.models = [
4241
{
4342
provider: "anthropic",
44-
model: "claude-3-7-sonnet-latest",
43+
model: "claude-sonnet-4-latest",
4544
apiKey: "${{ secrets.ANTHROPIC_API_KEY }}",
46-
name: "Claude 3.7 Sonnet",
45+
name: "Claude Sonnet 4",
4746
roles: ["chat", "edit"],
4847
},
4948
];

core/llm/llms/Anthropic.vitest.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ describe("Anthropic", () => {
134134
test("streamChat should send a valid request", async () => {
135135
const anthropic = new Anthropic({
136136
apiKey: "test-api-key",
137-
model: "claude-3-5-sonnet-latest",
137+
model: "claude-sonnet-4",
138138
apiBase: "https://api.anthropic.com/v1/",
139139
});
140140

@@ -155,7 +155,7 @@ describe("Anthropic", () => {
155155
"x-api-key": "test-api-key",
156156
},
157157
body: {
158-
model: "claude-3-5-sonnet-latest",
158+
model: "claude-sonnet-4",
159159
max_tokens: 8192,
160160
stream: true,
161161
messages: [
@@ -177,7 +177,7 @@ describe("Anthropic", () => {
177177
test("chat should send a valid request", async () => {
178178
const anthropic = new Anthropic({
179179
apiKey: "test-api-key",
180-
model: "claude-3-5-sonnet-latest",
180+
model: "claude-sonnet-4",
181181
apiBase: "https://api.anthropic.com/v1/",
182182
});
183183

@@ -198,7 +198,7 @@ describe("Anthropic", () => {
198198
"x-api-key": "test-api-key",
199199
},
200200
body: {
201-
model: "claude-3-5-sonnet-latest",
201+
model: "claude-sonnet-4",
202202
max_tokens: 8192,
203203
stream: true,
204204
messages: [
@@ -220,7 +220,7 @@ describe("Anthropic", () => {
220220
test("streamComplete should send a valid request", async () => {
221221
const anthropic = new Anthropic({
222222
apiKey: "test-api-key",
223-
model: "claude-3-5-sonnet-latest",
223+
model: "claude-sonnet-4",
224224
apiBase: "https://api.anthropic.com/v1/",
225225
});
226226

@@ -238,7 +238,7 @@ describe("Anthropic", () => {
238238
"x-api-key": "test-api-key",
239239
},
240240
body: {
241-
model: "claude-3-5-sonnet-latest",
241+
model: "claude-sonnet-4",
242242
max_tokens: 8192,
243243
stream: true,
244244
messages: [
@@ -260,7 +260,7 @@ describe("Anthropic", () => {
260260
test("complete should send a valid request", async () => {
261261
const anthropic = new Anthropic({
262262
apiKey: "test-api-key",
263-
model: "claude-3-5-sonnet-latest",
263+
model: "claude-sonnet-4",
264264
apiBase: "https://api.anthropic.com/v1/",
265265
});
266266

@@ -278,7 +278,7 @@ describe("Anthropic", () => {
278278
"x-api-key": "test-api-key",
279279
},
280280
body: {
281-
model: "claude-3-5-sonnet-latest",
281+
model: "claude-sonnet-4",
282282
max_tokens: 8192,
283283
stream: true,
284284
messages: [
@@ -301,7 +301,7 @@ describe("Anthropic", () => {
301301
test("should handle system message", async () => {
302302
const anthropic = new Anthropic({
303303
apiKey: "test-api-key",
304-
model: "claude-3-5-sonnet-latest",
304+
model: "claude-sonnet-4",
305305
apiBase: "https://api.anthropic.com/v1/",
306306
});
307307

@@ -325,7 +325,7 @@ describe("Anthropic", () => {
325325
"x-api-key": "test-api-key",
326326
},
327327
body: {
328-
model: "claude-3-5-sonnet-latest",
328+
model: "claude-sonnet-4",
329329
max_tokens: 8192,
330330
stream: true,
331331
messages: [
@@ -347,7 +347,7 @@ describe("Anthropic", () => {
347347
test("should handle tool calls", async () => {
348348
const anthropic = new Anthropic({
349349
apiKey: "test-api-key",
350-
model: "claude-3-5-sonnet-latest",
350+
model: "claude-sonnet-4",
351351
apiBase: "https://api.anthropic.com/v1/",
352352
});
353353

@@ -386,7 +386,7 @@ describe("Anthropic", () => {
386386
"x-api-key": "test-api-key",
387387
},
388388
body: {
389-
model: "claude-3-5-sonnet-latest",
389+
model: "claude-sonnet-4",
390390
max_tokens: 8192,
391391
stream: true,
392392
messages: [
@@ -424,7 +424,7 @@ describe("Anthropic", () => {
424424
test("should handle custom max tokens", async () => {
425425
const anthropic = new Anthropic({
426426
apiKey: "test-api-key",
427-
model: "claude-3-5-sonnet-latest",
427+
model: "claude-sonnet-4",
428428
apiBase: "https://api.anthropic.com/v1/",
429429
});
430430

@@ -446,7 +446,7 @@ describe("Anthropic", () => {
446446
"x-api-key": "test-api-key",
447447
},
448448
body: {
449-
model: "claude-3-5-sonnet-latest",
449+
model: "claude-sonnet-4",
450450
max_tokens: 1000,
451451
stream: true,
452452
messages: [
@@ -470,7 +470,7 @@ describe("Anthropic", () => {
470470
test("should throw error when API key is missing", async () => {
471471
const anthropic = new Anthropic({
472472
apiKey: "",
473-
model: "claude-3-5-sonnet-latest",
473+
model: "claude-sonnet-4",
474474
apiBase: "https://api.anthropic.com/v1/",
475475
});
476476

core/llm/llms/OpenRouter.vitest.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import OpenRouter from "./OpenRouter";
66
describe("OpenRouter Anthropic Caching", () => {
77
it("should detect Anthropic models correctly", () => {
88
const openRouter = new OpenRouter({
9-
model: "claude-3-5-sonnet-latest",
9+
model: "claude-sonnet-4-latest",
1010
apiKey: "test-key",
1111
});
1212

1313
// Test private method through modifyChatBody
1414
const body: ChatCompletionCreateParams = {
15-
model: "claude-3-5-sonnet-latest",
15+
model: "claude-sonnet-4-latest",
1616
messages: [],
1717
};
1818

@@ -71,7 +71,7 @@ describe("OpenRouter Anthropic Caching", () => {
7171

7272
it("should correctly handle cache_control with system messages present", () => {
7373
const openRouter = new OpenRouter({
74-
model: "claude-3-5-sonnet-latest",
74+
model: "claude-sonnet-4-latest",
7575
apiKey: "test-key",
7676
cacheBehavior: {
7777
cacheConversation: true,
@@ -80,7 +80,7 @@ describe("OpenRouter Anthropic Caching", () => {
8080
});
8181

8282
const body: ChatCompletionCreateParams = {
83-
model: "claude-3-5-sonnet-latest",
83+
model: "claude-sonnet-4-latest",
8484
messages: [
8585
{ role: "system", content: "You are a helpful assistant" },
8686
{ role: "user", content: "First user message" },
@@ -137,7 +137,7 @@ describe("OpenRouter Anthropic Caching", () => {
137137

138138
it("should add cache_control to system message when caching is enabled", () => {
139139
const openRouter = new OpenRouter({
140-
model: "claude-3-5-sonnet-latest",
140+
model: "claude-sonnet-4-latest",
141141
apiKey: "test-key",
142142
cacheBehavior: {
143143
cacheConversation: false,
@@ -146,7 +146,7 @@ describe("OpenRouter Anthropic Caching", () => {
146146
});
147147

148148
const body: ChatCompletionCreateParams = {
149-
model: "claude-3-5-sonnet-latest",
149+
model: "claude-sonnet-4-latest",
150150
messages: [
151151
{ role: "system", content: "You are a helpful assistant" },
152152
{ role: "user", content: "Hello" },
@@ -176,7 +176,7 @@ describe("OpenRouter Anthropic Caching", () => {
176176

177177
it("should handle array content correctly", () => {
178178
const openRouter = new OpenRouter({
179-
model: "claude-3-5-sonnet-latest",
179+
model: "claude-sonnet-4-latest",
180180
apiKey: "test-key",
181181
cacheBehavior: {
182182
cacheConversation: true,
@@ -185,7 +185,7 @@ describe("OpenRouter Anthropic Caching", () => {
185185
});
186186

187187
const body: ChatCompletionCreateParams = {
188-
model: "claude-3-5-sonnet-latest",
188+
model: "claude-sonnet-4-latest",
189189
messages: [
190190
{
191191
role: "user",

core/llm/toolSupport.ts

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,12 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
1414
}
1515
} catch (e) {}
1616

17-
return [
18-
"claude-3-5",
19-
"claude-3.5",
20-
"claude-3-7",
21-
"claude-3.7",
22-
"claude-sonnet-4",
23-
"claude-4-sonnet",
24-
"gpt-4",
25-
"o3",
26-
"gemini",
27-
"claude-opus-4",
28-
"gemma",
29-
].some((part) => model.toLowerCase().startsWith(part));
17+
return ["claude", "gpt-4", "o3", "gemini", "gemma"].some((part) =>
18+
model.toLowerCase().startsWith(part),
19+
);
3020
},
3121
anthropic: (model) => {
32-
if (
33-
[
34-
"claude-3-5",
35-
"claude-3.5",
36-
"claude-3-7",
37-
"claude-3.7",
38-
"claude-sonnet-4",
39-
"claude-4-sonnet",
40-
"claude-opus-4",
41-
].some((part) => model.toLowerCase().startsWith(part))
42-
) {
22+
if (["claude"].some((part) => model.toLowerCase().startsWith(part))) {
4323
return true;
4424
}
4525

docs/customize/model-providers/top-level/anthropic.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sidebarTitle: "Anthropic"
4141
</Tabs>
4242

4343
<Info>
44-
**Check out a more advanced configuration [here](https://hub.continue.dev/anthropic/claude-4-sonnet?view=config)**
44+
**Check out a more advanced configuration [here](https://hub.continue.dev/anthropic/claude-sonnet-4-5?view=config)**
4545
</Info>
4646

4747
## How to Enable Prompt Caching with Claude

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/ServerConstants.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const val DEFAULT_CONFIG =
1414
{
1515
"models": [
1616
{
17-
"model": "claude-3-5-sonnet-latest",
17+
"model": "claude-sonnet-4-5",
1818
"provider": "anthropic",
1919
"apiKey": "",
20-
"title": "Claude 3.5 Sonnet"
20+
"title": "Claude Sonnet 4.5"
2121
}
2222
],
2323
"tabAutocompleteModel": {

extensions/vscode/config_schema.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -850,14 +850,10 @@
850850
"anyOf": [
851851
{
852852
"enum": [
853-
"claude-2",
854-
"claude-instant-1",
855-
"claude-3-5-sonnet-latest",
856-
"claude-3-7-sonnet-20250219",
857-
"claude-3-opus-20240229",
858-
"claude-3-sonnet-20240229",
859-
"claude-3-haiku-20240307",
860-
"claude-2.1"
853+
"claude-sonnet-4",
854+
"claude-sonnet-4-5",
855+
"claude-opus-4-1",
856+
"claude-haiku-4-5"
861857
]
862858
},
863859
{
@@ -1608,14 +1604,10 @@
16081604
"codeup-13b",
16091605
"deepseek-7b",
16101606
"deepseek-33b",
1611-
"claude-2",
1612-
"claude-instant-1",
1613-
"claude-3-5-sonnet-latest",
1614-
"claude-3-5-sonnet-20240620",
1615-
"claude-3-opus-20240229",
1616-
"claude-3-sonnet-20240229",
1617-
"claude-3-haiku-20240307",
1618-
"claude-2.1",
1607+
"claude-sonnet-4",
1608+
"claude-sonnet-4-5",
1609+
"claude-opus-4-1",
1610+
"claude-haiku-4-5",
16191611
"command-r",
16201612
"command-r-plus",
16211613
"chat-bison-001",

extensions/vscode/e2e/test-continue/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"provider": "mock",
1818
"title": "TOOL MOCK LLM",
19-
"model": "claude-3-5-sonnet-latest",
19+
"model": "claude-sonnet-4-latest",
2020
"capabilities": {
2121
"tools": true
2222
},
@@ -50,7 +50,7 @@
5050
{
5151
"provider": "mock",
5252
"title": "SYSTEM MESSAGE MOCK LLM",
53-
"model": "claude-3-5-sonnet-latest",
53+
"model": "claude-sonnet-4-latest",
5454
"requestOptions": {
5555
"extraBodyProperties": {
5656
"chatStream": [["REPEAT_SYSTEM_MSG"]]
@@ -60,7 +60,7 @@
6060
{
6161
"provider": "mock",
6262
"title": "LAST MESSAGE MOCK LLM",
63-
"model": "claude-3-5-sonnet-latest",
63+
"model": "claude-sonnet-4-latest",
6464
"requestOptions": {
6565
"extraBodyProperties": {
6666
"chatStream": [["REPEAT_LAST_MSG"]]

0 commit comments

Comments
 (0)