From c52d6d52aba6fc4900bb23e2cc6bd2b5c0d8836c Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 22 May 2025 17:07:56 -0400 Subject: [PATCH] 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