Skip to content

Commit a87dc2d

Browse files
authored
Merge pull request #8330 from continuedev/dallin/sonnet-4-5-updates
feat: sonnet 4.5 updates, 3.5 deprecation
2 parents 1f29233 + 5908d18 commit a87dc2d

File tree

20 files changed

+230
-173
lines changed

20 files changed

+230
-173
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ function getContentsForNewBlock(blockType: BlockType): ConfigYaml {
4242
configYaml.models = [
4343
{
4444
provider: "anthropic",
45-
model: "claude-3-7-sonnet-latest",
45+
model: "claude-sonnet-4-5",
4646
apiKey: "${{ secrets.ANTHROPIC_API_KEY }}",
47-
name: "Claude 3.7 Sonnet",
47+
name: "Claude Sonnet 4.5",
4848
roles: ["chat", "edit"],
4949
},
5050
];

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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
474474
apiBase: "https://api.anthropic.com/v1/",
475475
});
476476

core/llm/llms/OpenRouter.vitest.ts

Lines changed: 10 additions & 10 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-5",
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-5",
1616
messages: [],
1717
};
1818

@@ -22,7 +22,7 @@ describe("OpenRouter Anthropic Caching", () => {
2222

2323
it("should add cache_control to user messages when caching is enabled", () => {
2424
const openRouter = new OpenRouter({
25-
model: "anthropic/claude-3.5-sonnet",
25+
model: "anthropic/claude-sonnet-4.5",
2626
apiKey: "test-key",
2727
cacheBehavior: {
2828
cacheConversation: true,
@@ -31,7 +31,7 @@ describe("OpenRouter Anthropic Caching", () => {
3131
});
3232

3333
const body: ChatCompletionCreateParams = {
34-
model: "anthropic/claude-3.5-sonnet",
34+
model: "anthropic/claude-sonnet-4.5",
3535
messages: [
3636
{ role: "user", content: "First message" },
3737
{ role: "assistant", content: "Response" },
@@ -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-5",
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-5",
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-5",
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-5",
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-5",
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-5",
189189
messages: [
190190
{
191191
role: "user",

core/llm/toolSupport.test.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,11 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
179179
});
180180

181181
it("should return undefined for Claude Haiku and Opus models", () => {
182-
expect(supportsFn("anthropic.claude-3-5-haiku-20240307-v1:0")).toBe(
183-
false,
184-
);
185-
expect(supportsFn("anthropic.claude-3.5-haiku-20240620-v1:0")).toBe(
186-
false,
187-
);
188-
expect(supportsFn("anthropic.claude-3-7-haiku-20240620-v1:0")).toBe(
189-
false,
190-
);
191-
expect(supportsFn("anthropic.claude-3-5-opus-20240620-v1:0")).toBe(false);
192-
expect(supportsFn("anthropic.claude-3.7-opus-20240620-v1:0")).toBe(false);
182+
expect(supportsFn("anthropic.claude-3-5-haiku-20240307-v1:0")).toBe(true);
183+
expect(supportsFn("anthropic.claude-3.5-haiku-20240620-v1:0")).toBe(true);
184+
expect(supportsFn("anthropic.claude-3-7-haiku-20240620-v1:0")).toBe(true);
185+
expect(supportsFn("anthropic.claude-3-5-opus-20240620-v1:0")).toBe(true);
186+
expect(supportsFn("anthropic.claude-3.7-opus-20240620-v1:0")).toBe(true);
193187
});
194188

195189
it("should return undefined for other unsupported models", () => {

core/llm/toolSupport.ts

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,17 @@ 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-
const lower = model.toLowerCase();
33-
if (
34-
[
35-
"claude-3-5",
36-
"claude-3.5",
37-
"claude-3-7",
38-
"claude-3.7",
39-
"claude-sonnet-4",
40-
"claude-4-sonnet",
41-
"claude-opus-4",
42-
].some((part) => lower.startsWith(part))
43-
) {
44-
return true;
22+
if (model.includes("claude-2") || model.includes("claude-instant")) {
23+
return false;
4524
}
46-
if (lower.includes("claude") && lower.includes("4-5")) {
25+
if (["claude"].some((part) => model.toLowerCase().startsWith(part))) {
4726
return true;
4827
}
49-
5028
return false;
5129
},
5230
azure: (model) => {
@@ -125,15 +103,12 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
125103
);
126104
},
127105
bedrock: (model) => {
106+
if (model.includes("claude-2") || model.includes("claude-instant")) {
107+
return false;
108+
}
128109
if (
129110
[
130-
"claude-3-5-sonnet",
131-
"claude-3.5-sonnet",
132-
"claude-3-7-sonnet",
133-
"claude-3.7-sonnet",
134-
"claude-sonnet-4",
135-
"claude-4-sonnet",
136-
"claude-opus-4",
111+
"claude",
137112
"nova-lite",
138113
"nova-pro",
139114
"nova-micro",
@@ -280,8 +255,7 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
280255
"openai/o3",
281256
"openai/o4",
282257
"openai/gpt-oss",
283-
"anthropic/claude-3",
284-
"anthropic/claude-4",
258+
"anthropic/claude",
285259
"microsoft/phi-3",
286260
"google/gemini-flash-1.5",
287261
"google/gemini-2",
@@ -391,7 +365,8 @@ export function isRecommendedAgentModel(modelName: string): boolean {
391365
const recs: RegExp[][] = [
392366
[/o[134]/],
393367
[/deepseek/, /r1|reasoner/],
394-
[/gemini/, /2\.5|3/, /pro/],
368+
[/gemini/, /2\.5/, /pro/],
369+
[/gemini/, /3-pro/],
395370
[/gpt/, /-5|5\.1/],
396371
[/claude/, /sonnet/, /3\.7|3-7|-4/],
397372
[/claude/, /opus/, /-4/],

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

docs/customize/models.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ Read more about [model roles](/customize/model-roles), [model capabilities](/cus
3030

3131
# Frontier Models
3232

33-
[Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) from Anthropic
33+
[Claude Sonnet 4.5](https://hub.continue.dev/anthropic/claude-sonnet-4-5) from Anthropic
3434

3535
1. Get your API key from [Anthropic](https://console.anthropic.com/)
36-
2. Add [Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) to a config on Continue Mission Control
36+
2. Add[Claude Sonnet 4.5](https://hub.continue.dev/anthropic/claude-sonnet-4-5) to a config on Continue Mission Control
3737
3. Add `ANTHROPIC_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
3838
4. Click `Reload config` in the config selector in the Continue IDE extension
3939

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": {

0 commit comments

Comments
 (0)