Skip to content

Commit 0e644f1

Browse files
committed
Default to Claude 3.7 where appropriate
1 parent 9897442 commit 0e644f1

File tree

9 files changed

+26
-62
lines changed

9 files changed

+26
-62
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ body:
3333
id: model
3434
attributes:
3535
label: Which Model are you using?
36-
description: Please specify the model you're using (e.g. Claude 3.5 Sonnet)
36+
description: Please specify the model you're using (e.g. Claude 3.7 Sonnet)
3737
validations:
3838
required: true
3939
- type: textarea

src/core/Cline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ export class Cline {
27922792
"mistake_limit_reached",
27932793
this.api.getModel().id.includes("claude")
27942794
? `This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "Try breaking down the task into smaller steps").`
2795-
: "Roo Code uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.5 Sonnet for its advanced agentic coding capabilities.",
2795+
: "Roo Code uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.7 Sonnet for its advanced agentic coding capabilities.",
27962796
)
27972797
if (response === "messageResponse") {
27982798
userContent.push(

src/core/webview/ClineProvider.ts

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,23 +1900,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
19001900
}
19011901

19021902
const response = await axios.get("https://router.requesty.ai/v1/models", config)
1903-
/*
1904-
{
1905-
"id": "anthropic/claude-3-5-sonnet-20240620",
1906-
"object": "model",
1907-
"created": 1738243330,
1908-
"owned_by": "system",
1909-
"input_price": 0.000003,
1910-
"caching_price": 0.00000375,
1911-
"cached_price": 3E-7,
1912-
"output_price": 0.000015,
1913-
"max_output_tokens": 8192,
1914-
"context_window": 200000,
1915-
"supports_caching": true,
1916-
"description": "Anthropic's most intelligent model. Highest level of intelligence and capability"
1917-
},
1918-
}
1919-
*/
1903+
19201904
if (response.data) {
19211905
const rawModels = response.data.data
19221906
const parsePrice = (price: any) => {
@@ -2116,34 +2100,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
21162100
)
21172101

21182102
const models: Record<string, ModelInfo> = {}
2103+
21192104
try {
21202105
const response = await axios.get("https://openrouter.ai/api/v1/models")
2121-
/*
2122-
{
2123-
"id": "anthropic/claude-3.5-sonnet",
2124-
"name": "Anthropic: Claude 3.5 Sonnet",
2125-
"created": 1718841600,
2126-
"description": "Claude 3.5 Sonnet delivers better-than-Opus capabilities, faster-than-Sonnet speeds, at the same Sonnet prices. Sonnet is particularly good at:\n\n- Coding: Autonomously writes, edits, and runs code with reasoning and troubleshooting\n- Data science: Augments human data science expertise; navigates unstructured data while using multiple tools for insights\n- Visual processing: excelling at interpreting charts, graphs, and images, accurately transcribing text to derive insights beyond just the text alone\n- Agentic tasks: exceptional tool use, making it great at agentic tasks (i.e. complex, multi-step problem solving tasks that require engaging with other systems)\n\n#multimodal",
2127-
"context_length": 200000,
2128-
"architecture": {
2129-
"modality": "text+image-\u003Etext",
2130-
"tokenizer": "Claude",
2131-
"instruct_type": null
2132-
},
2133-
"pricing": {
2134-
"prompt": "0.000003",
2135-
"completion": "0.000015",
2136-
"image": "0.0048",
2137-
"request": "0"
2138-
},
2139-
"top_provider": {
2140-
"context_length": 200000,
2141-
"max_completion_tokens": 8192,
2142-
"is_moderated": true
2143-
},
2144-
"per_request_limits": null
2145-
},
2146-
*/
2106+
21472107
if (response.data?.data) {
21482108
const rawModels = response.data.data
21492109
const parsePrice = (price: any) => {
@@ -2152,6 +2112,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
21522112
}
21532113
return undefined
21542114
}
2115+
21552116
for (const rawModel of rawModels) {
21562117
const modelInfo: ModelInfo = {
21572118
maxTokens: rawModel.top_provider?.max_completion_tokens,
@@ -2164,9 +2125,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
21642125
}
21652126

21662127
switch (rawModel.id) {
2128+
case "anthropic/claude-3.7-sonnet":
21672129
case "anthropic/claude-3.5-sonnet":
21682130
case "anthropic/claude-3.5-sonnet:beta":
2169-
// NOTE: this needs to be synced with api.ts/openrouter default model info
2131+
// NOTE: this needs to be synced with api.ts/openrouter default model info.
21702132
modelInfo.supportsComputerUse = true
21712133
modelInfo.supportsPromptCache = true
21722134
modelInfo.cacheWritesPrice = 3.75

src/shared/api.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export interface ModelInfo {
9393
// Anthropic
9494
// https://docs.anthropic.com/en/docs/about-claude/models
9595
export type AnthropicModelId = keyof typeof anthropicModels
96-
export const anthropicDefaultModelId: AnthropicModelId = "claude-3-5-sonnet-20241022"
96+
export const anthropicDefaultModelId: AnthropicModelId = "claude-3-7-sonnet-20250219"
9797
export const anthropicModels = {
9898
"claude-3-7-sonnet-20250219": {
9999
maxTokens: 64_000,
@@ -355,9 +355,9 @@ export const bedrockModels = {
355355

356356
// Glama
357357
// https://glama.ai/models
358-
export const glamaDefaultModelId = "anthropic/claude-3-5-sonnet"
358+
export const glamaDefaultModelId = "anthropic/claude-3-7-sonnet"
359359
export const glamaDefaultModelInfo: ModelInfo = {
360-
maxTokens: 8192,
360+
maxTokens: 64_000,
361361
contextWindow: 200_000,
362362
supportsImages: true,
363363
supportsComputerUse: true,
@@ -367,11 +367,14 @@ export const glamaDefaultModelInfo: ModelInfo = {
367367
cacheWritesPrice: 3.75,
368368
cacheReadsPrice: 0.3,
369369
description:
370-
"The new Claude 3.5 Sonnet delivers better-than-Opus capabilities, faster-than-Sonnet speeds, at the same Sonnet prices. Sonnet is particularly good at:\n\n- Coding: New Sonnet scores ~49% on SWE-Bench Verified, higher than the last best score, and without any fancy prompt scaffolding\n- Data science: Augments human data science expertise; navigates unstructured data while using multiple tools for insights\n- Visual processing: excelling at interpreting charts, graphs, and images, accurately transcribing text to derive insights beyond just the text alone\n- Agentic tasks: exceptional tool use, making it great at agentic tasks (i.e. complex, multi-step problem solving tasks that require engaging with other systems)\n\n#multimodal\n\n_This is a faster endpoint, made available in collaboration with Anthropic, that is self-moderated: response moderation happens on the provider's side instead of OpenRouter's. For requests that pass moderation, it's identical to the [Standard](/anthropic/claude-3.5-sonnet) variant._",
370+
"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
371371
}
372372

373+
// Requesty
374+
// https://requesty.ai/router-2
375+
export const requestyDefaultModelId = "anthropic/claude-3-7-sonnet-latest"
373376
export const requestyDefaultModelInfo: ModelInfo = {
374-
maxTokens: 8192,
377+
maxTokens: 64_000,
375378
contextWindow: 200_000,
376379
supportsImages: true,
377380
supportsComputerUse: true,
@@ -381,15 +384,14 @@ export const requestyDefaultModelInfo: ModelInfo = {
381384
cacheWritesPrice: 3.75,
382385
cacheReadsPrice: 0.3,
383386
description:
384-
"The new Claude 3.5 Sonnet delivers better-than-Opus capabilities, faster-than-Sonnet speeds, at the same Sonnet prices. Sonnet is particularly good at:\n\n- Coding: New Sonnet scores ~49% on SWE-Bench Verified, higher than the last best score, and without any fancy prompt scaffolding\n- Data science: Augments human data science expertise; navigates unstructured data while using multiple tools for insights\n- Visual processing: excelling at interpreting charts, graphs, and images, accurately transcribing text to derive insights beyond just the text alone\n- Agentic tasks: exceptional tool use, making it great at agentic tasks (i.e. complex, multi-step problem solving tasks that require engaging with other systems)\n\n#multimodal\n\n_This is a faster endpoint, made available in collaboration with Anthropic, that is self-moderated: response moderation happens on the provider's side instead of OpenRouter's. For requests that pass moderation, it's identical to the [Standard](/anthropic/claude-3.5-sonnet) variant._",
387+
"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
385388
}
386-
export const requestyDefaultModelId = "anthropic/claude-3-5-sonnet"
387389

388390
// OpenRouter
389391
// https://openrouter.ai/models?order=newest&supported_parameters=tools
390-
export const openRouterDefaultModelId = "anthropic/claude-3.5-sonnet:beta" // will always exist in openRouterModels
392+
export const openRouterDefaultModelId = "anthropic/claude-3.7-sonnet"
391393
export const openRouterDefaultModelInfo: ModelInfo = {
392-
maxTokens: 8192,
394+
maxTokens: 64_000,
393395
contextWindow: 200_000,
394396
supportsImages: true,
395397
supportsComputerUse: true,
@@ -399,13 +401,13 @@ export const openRouterDefaultModelInfo: ModelInfo = {
399401
cacheWritesPrice: 3.75,
400402
cacheReadsPrice: 0.3,
401403
description:
402-
"The new Claude 3.5 Sonnet delivers better-than-Opus capabilities, faster-than-Sonnet speeds, at the same Sonnet prices. Sonnet is particularly good at:\n\n- Coding: New Sonnet scores ~49% on SWE-Bench Verified, higher than the last best score, and without any fancy prompt scaffolding\n- Data science: Augments human data science expertise; navigates unstructured data while using multiple tools for insights\n- Visual processing: excelling at interpreting charts, graphs, and images, accurately transcribing text to derive insights beyond just the text alone\n- Agentic tasks: exceptional tool use, making it great at agentic tasks (i.e. complex, multi-step problem solving tasks that require engaging with other systems)\n\n#multimodal\n\n_This is a faster endpoint, made available in collaboration with Anthropic, that is self-moderated: response moderation happens on the provider's side instead of OpenRouter's. For requests that pass moderation, it's identical to the [Standard](/anthropic/claude-3.5-sonnet) variant._",
404+
"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
403405
}
404406

405407
// Vertex AI
406408
// https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude
407409
export type VertexModelId = keyof typeof vertexModels
408-
export const vertexDefaultModelId: VertexModelId = "claude-3-5-sonnet-v2@20241022"
410+
export const vertexDefaultModelId: VertexModelId = "claude-3-7-sonnet@20250219"
409411
export const vertexModels = {
410412
"claude-3-7-sonnet@20250219": {
411413
maxTokens: 8192,

src/test/suite/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function run(): Promise<void> {
3939
: await globalThis.extension.activate()
4040
globalThis.provider = globalThis.api.sidebarProvider
4141
await globalThis.provider.updateGlobalState("apiProvider", "openrouter")
42-
await globalThis.provider.updateGlobalState("openRouterModelId", "anthropic/claude-3.5-sonnet")
42+
await globalThis.provider.updateGlobalState("openRouterModelId", "anthropic/claude-3.7-sonnet")
4343
await globalThis.provider.storeSecret(
4444
"openRouterApiKey",
4545
process.env.OPENROUTER_API_KEY || "sk-or-v1-fake-api-key",

webview-ui/src/components/settings/GlamaModelPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export const GlamaModelPicker = () => (
1010
refreshMessageType="refreshGlamaModels"
1111
serviceName="Glama"
1212
serviceUrl="https://glama.ai/models"
13-
recommendedModel="anthropic/claude-3-5-sonnet"
13+
recommendedModel="anthropic/claude-3-7-sonnet"
1414
/>
1515
)

webview-ui/src/components/settings/OpenRouterModelPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export const OpenRouterModelPicker = () => (
1010
refreshMessageType="refreshOpenRouterModels"
1111
serviceName="OpenRouter"
1212
serviceUrl="https://openrouter.ai/models"
13-
recommendedModel="anthropic/claude-3.5-sonnet:beta"
13+
recommendedModel="anthropic/claude-3.7-sonnet"
1414
/>
1515
)

webview-ui/src/components/settings/RequestyModelPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const RequestyModelPicker = () => {
1616
}}
1717
serviceName="Requesty"
1818
serviceUrl="https://requesty.ai"
19-
recommendedModel="anthropic/claude-3-5-sonnet-latest"
19+
recommendedModel="anthropic/claude-3-7-sonnet-latest"
2020
/>
2121
)
2222
}

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
765765
color: "var(--vscode-descriptionForeground)",
766766
}}>
767767
When enabled, Roo will be able to edit files more quickly and will automatically reject
768-
truncated full-file writes. Works best with the latest Claude 3.5 Sonnet model.
768+
truncated full-file writes. Works best with the latest Claude 3.7 Sonnet model.
769769
</p>
770770

771771
{diffEnabled && (

0 commit comments

Comments
 (0)