Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ body:
- **OS**: macOS
- **Continue version**: v0.9.4
- **IDE version**: VSCode 1.85.1
- Model: Claude Sonnet 3.5
- Model: Claude Sonnet 4.5
- Agent configuration
value: |
- OS:
Expand Down
7 changes: 3 additions & 4 deletions core/config/workspace/workspaceBlocks.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {
BlockType,
ConfigYaml,
createRuleMarkdown,
createPromptMarkdown,
RULE_FILE_EXTENSION,
createRuleMarkdown,
} from "@continuedev/config-yaml";
import * as YAML from "yaml";
import { IDE } from "../..";
Expand Down Expand Up @@ -41,9 +40,9 @@ function getContentsForNewBlock(blockType: BlockType): ConfigYaml {
configYaml.models = [
{
provider: "anthropic",
model: "claude-3-7-sonnet-latest",
model: "claude-sonnet-4-latest",
apiKey: "${{ secrets.ANTHROPIC_API_KEY }}",
name: "Claude 3.7 Sonnet",
name: "Claude Sonnet 4",
roles: ["chat", "edit"],
},
];
Expand Down
30 changes: 15 additions & 15 deletions core/llm/llms/Anthropic.vitest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe("Anthropic", () => {
test("streamChat should send a valid request", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand All @@ -155,7 +155,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 8192,
stream: true,
messages: [
Expand All @@ -177,7 +177,7 @@ describe("Anthropic", () => {
test("chat should send a valid request", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand All @@ -198,7 +198,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 8192,
stream: true,
messages: [
Expand All @@ -220,7 +220,7 @@ describe("Anthropic", () => {
test("streamComplete should send a valid request", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand All @@ -238,7 +238,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 8192,
stream: true,
messages: [
Expand All @@ -260,7 +260,7 @@ describe("Anthropic", () => {
test("complete should send a valid request", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand All @@ -278,7 +278,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 8192,
stream: true,
messages: [
Expand All @@ -301,7 +301,7 @@ describe("Anthropic", () => {
test("should handle system message", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand All @@ -325,7 +325,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 8192,
stream: true,
messages: [
Expand All @@ -347,7 +347,7 @@ describe("Anthropic", () => {
test("should handle tool calls", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand Down Expand Up @@ -386,7 +386,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 8192,
stream: true,
messages: [
Expand Down Expand Up @@ -424,7 +424,7 @@ describe("Anthropic", () => {
test("should handle custom max tokens", async () => {
const anthropic = new Anthropic({
apiKey: "test-api-key",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand All @@ -446,7 +446,7 @@ describe("Anthropic", () => {
"x-api-key": "test-api-key",
},
body: {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
max_tokens: 1000,
stream: true,
messages: [
Expand All @@ -470,7 +470,7 @@ describe("Anthropic", () => {
test("should throw error when API key is missing", async () => {
const anthropic = new Anthropic({
apiKey: "",
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4",
apiBase: "https://api.anthropic.com/v1/",
});

Expand Down
16 changes: 8 additions & 8 deletions core/llm/llms/OpenRouter.vitest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import OpenRouter from "./OpenRouter";
describe("OpenRouter Anthropic Caching", () => {
it("should detect Anthropic models correctly", () => {
const openRouter = new OpenRouter({
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4-latest",
apiKey: "test-key",
});

// Test private method through modifyChatBody
const body: ChatCompletionCreateParams = {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4-latest",
messages: [],
};

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

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

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

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

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

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

const body: ChatCompletionCreateParams = {
model: "claude-3-5-sonnet-latest",
model: "claude-sonnet-4-latest",
messages: [
{
role: "user",
Expand Down
28 changes: 4 additions & 24 deletions core/llm/toolSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,12 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
}
} catch (e) {}

return [
"claude-3-5",
"claude-3.5",
"claude-3-7",
"claude-3.7",
"claude-sonnet-4",
"claude-4-sonnet",
"gpt-4",
"o3",
"gemini",
"claude-opus-4",
"gemma",
].some((part) => model.toLowerCase().startsWith(part));
return ["claude", "gpt-4", "o3", "gemini", "gemma"].some((part) =>
model.toLowerCase().startsWith(part),
);
},
anthropic: (model) => {
if (
[
"claude-3-5",
"claude-3.5",
"claude-3-7",
"claude-3.7",
"claude-sonnet-4",
"claude-4-sonnet",
"claude-opus-4",
].some((part) => model.toLowerCase().startsWith(part))
) {
if (["claude"].some((part) => model.toLowerCase().startsWith(part))) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/customize/model-providers/top-level/anthropic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sidebarTitle: "Anthropic"
</Tabs>

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

## How to Enable Prompt Caching with Claude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const val DEFAULT_CONFIG =
{
"models": [
{
"model": "claude-3-5-sonnet-latest",
"model": "claude-sonnet-4-5",
"provider": "anthropic",
"apiKey": "",
"title": "Claude 3.5 Sonnet"
"title": "Claude Sonnet 4.5"
}
],
"tabAutocompleteModel": {
Expand Down
24 changes: 8 additions & 16 deletions extensions/vscode/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -850,14 +850,10 @@
"anyOf": [
{
"enum": [
"claude-2",
"claude-instant-1",
"claude-3-5-sonnet-latest",
"claude-3-7-sonnet-20250219",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-2.1"
"claude-sonnet-4",
"claude-sonnet-4-5",
"claude-opus-4-1",
"claude-haiku-4-5"
]
},
{
Expand Down Expand Up @@ -1608,14 +1604,10 @@
"codeup-13b",
"deepseek-7b",
"deepseek-33b",
"claude-2",
"claude-instant-1",
"claude-3-5-sonnet-latest",
"claude-3-5-sonnet-20240620",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-2.1",
"claude-sonnet-4",
"claude-sonnet-4-5",
"claude-opus-4-1",
"claude-haiku-4-5",
"command-r",
"command-r-plus",
"chat-bison-001",
Expand Down
6 changes: 3 additions & 3 deletions extensions/vscode/e2e/test-continue/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"provider": "mock",
"title": "TOOL MOCK LLM",
"model": "claude-3-5-sonnet-latest",
"model": "claude-sonnet-4-latest",
"capabilities": {
"tools": true
},
Expand Down Expand Up @@ -50,7 +50,7 @@
{
"provider": "mock",
"title": "SYSTEM MESSAGE MOCK LLM",
"model": "claude-3-5-sonnet-latest",
"model": "claude-sonnet-4-latest",
"requestOptions": {
"extraBodyProperties": {
"chatStream": [["REPEAT_SYSTEM_MSG"]]
Expand All @@ -60,7 +60,7 @@
{
"provider": "mock",
"title": "LAST MESSAGE MOCK LLM",
"model": "claude-3-5-sonnet-latest",
"model": "claude-sonnet-4-latest",
"requestOptions": {
"extraBodyProperties": {
"chatStream": [["REPEAT_LAST_MSG"]]
Expand Down
Loading
Loading