From 29ebd9b27462327174309e3b71aadeaf8d374a36 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Thu, 22 May 2025 13:42:04 -0700 Subject: [PATCH 1/2] fix spelling of reterence (#3804) Co-authored-by: Matt Rubens --- .../__snapshots__/system.test.ts.snap | 24 +++++++++---------- .../prompts/sections/markdown-formatting.ts | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap b/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap index f0860e0e39..673416b431 100644 --- a/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap +++ b/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap @@ -7,7 +7,7 @@ exports[`SYSTEM_PROMPT should exclude diff strategy tool description when diffEn MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -480,7 +480,7 @@ exports[`SYSTEM_PROMPT should exclude diff strategy tool description when diffEn MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -953,7 +953,7 @@ exports[`SYSTEM_PROMPT should explicitly handle undefined mcpHub 1`] = ` MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -1426,7 +1426,7 @@ exports[`SYSTEM_PROMPT should handle different browser viewport sizes 1`] = ` MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -1955,7 +1955,7 @@ exports[`SYSTEM_PROMPT should include MCP server info when mcpHub is provided 1` MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -2496,7 +2496,7 @@ exports[`SYSTEM_PROMPT should include browser actions when supportsComputerUse i MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -3025,7 +3025,7 @@ exports[`SYSTEM_PROMPT should include diff strategy tool description when diffEn MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -3588,7 +3588,7 @@ exports[`SYSTEM_PROMPT should maintain consistent system prompt 1`] = ` MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -4103,7 +4103,7 @@ exports[`addCustomInstructions should exclude MCP server creation info when disa MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -4653,7 +4653,7 @@ exports[`addCustomInstructions should generate correct prompt for architect mode MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -5117,7 +5117,7 @@ exports[`addCustomInstructions should generate correct prompt for ask mode 1`] = MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== @@ -5498,7 +5498,7 @@ exports[`addCustomInstructions should include MCP server creation info when enab MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ==== diff --git a/src/core/prompts/sections/markdown-formatting.ts b/src/core/prompts/sections/markdown-formatting.ts index fe152a1a41..87f922e94a 100644 --- a/src/core/prompts/sections/markdown-formatting.ts +++ b/src/core/prompts/sections/markdown-formatting.ts @@ -3,5 +3,5 @@ export function markdownFormattingSection(): string { MARKDOWN RULES -ALL responses MUST show ANY \`language construct\` OR filename reterence as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ` +ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in ` } From c52d6d52aba6fc4900bb23e2cc6bd2b5c0d8836c Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 22 May 2025 17:07:56 -0400 Subject: [PATCH 2/2] Fix openrouter names for caching and computer use (#3868) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- .changeset/sweet-turtles-wink.md | 5 +++++ src/shared/api.ts | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .changeset/sweet-turtles-wink.md diff --git a/.changeset/sweet-turtles-wink.md b/.changeset/sweet-turtles-wink.md new file mode 100644 index 0000000000..d02d7ee504 --- /dev/null +++ b/.changeset/sweet-turtles-wink.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Fix OpenRouter names diff --git a/src/shared/api.ts b/src/shared/api.ts index 3545494354..2cbbcd7f9a 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -1921,10 +1921,10 @@ export const PROMPT_CACHING_MODELS = new Set([ "anthropic/claude-3.7-sonnet", "anthropic/claude-3.7-sonnet:beta", "anthropic/claude-3.7-sonnet:thinking", - "anthropic/claude-sonnet-4-20250514", - "anthropic/claude-sonnet-4-20250514:thinking", - "anthropic/claude-opus-4-20250514", - "anthropic/claude-opus-4-20250514:thinking", + "anthropic/claude-sonnet-4", + "anthropic/claude-sonnet-4:thinking", + "anthropic/claude-opus-4", + "anthropic/claude-opus-4:thinking", "google/gemini-2.5-pro-preview", "google/gemini-2.5-flash-preview", "google/gemini-2.5-flash-preview:thinking", @@ -1942,10 +1942,10 @@ export const COMPUTER_USE_MODELS = new Set([ "anthropic/claude-3.7-sonnet", "anthropic/claude-3.7-sonnet:beta", "anthropic/claude-3.7-sonnet:thinking", - "anthropic/claude-sonnet-4-20250514", - "anthropic/claude-sonnet-4-20250514:thinking", - "anthropic/claude-opus-4-20250514", - "anthropic/claude-opus-4-20250514:thinking", + "anthropic/claude-sonnet-4", + "anthropic/claude-sonnet-4:thinking", + "anthropic/claude-opus-4", + "anthropic/claude-opus-4:thinking", ]) const routerNames = ["openrouter", "requesty", "glama", "unbound", "litellm"] as const