From f93e7946aa9ea80010e5439aea744fdcd6e7dea2 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:37:09 -0400 Subject: [PATCH] Remove unusable models; default to OpenRouter for new users; update Announcement --- CHANGELOG.md | 2 +- src/shared/api.ts | 31 +++++++++++++--------- webview-ui/src/components/Announcement.tsx | 4 +-- webview-ui/src/components/ApiOptions.tsx | 2 +- webview-ui/src/components/WelcomeView.tsx | 8 ++++++ 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5054057..cb5ece2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to the "claude-dev" extension will be documented in this fil ## [1.1.1] -- Added the ability to choose other Claude models (+ GPT-4o, Gemini, DeepSeek, and Mistral if you use OpenRouter) +- Added the ability to choose other Claude models (+ GPT-4o, DeepSeek, and Mistral if you use OpenRouter) ## [1.1.0] diff --git a/src/shared/api.ts b/src/shared/api.ts index 40fb728..f03a0c4 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -152,18 +152,25 @@ export const openRouterModels = { // inputPrice: 0.06, // outputPrice: 0.06, // }, - "google/gemini-pro-1.5": { - maxTokens: 8192, - supportsImages: true, - inputPrice: 2.5, - outputPrice: 7.5, - }, - "google/gemini-flash-1.5": { - maxTokens: 8192, - supportsImages: true, - inputPrice: 0.25, - outputPrice: 0.75, - }, + // OpenRouter needs to fix mapping gemini 1.5 responses for tool calls properly, they return content with line breaks formatted wrong (too many escapes), and throw errors for being in the wrong order when they're not. They also cannot handle feedback given to a request with multiple tools. Giving feedback to one tool use requests works fine. ("Please ensure that function response turn comes immediately after a function call turn. And the number of function response parts should be equal to number of function call parts of the function call turn.") + // "google/gemini-pro-1.5": { + // maxTokens: 8192, + // supportsImages: false, // "Function Calling is not supported with non-text input" + // inputPrice: 2.5, + // outputPrice: 7.5, + // }, + // "google/gemini-flash-1.5": { + // maxTokens: 8192, + // supportsImages: false, // "Function Calling is not supported with non-text input" + // inputPrice: 0.25, + // outputPrice: 0.75, + // }, + // "google/gemini-pro": { + // maxTokens: 8192, + // supportsImages: false, // "Function Calling is not supported with non-text input" + // inputPrice: 0.125, + // outputPrice: 0.375, + // }, // while deepseek coder can use tools, it may sometimes send tool invocation as a text block "deepseek/deepseek-coder": { maxTokens: 4096, diff --git a/webview-ui/src/components/Announcement.tsx b/webview-ui/src/components/Announcement.tsx index 13acbb1..4e5d759 100644 --- a/webview-ui/src/components/Announcement.tsx +++ b/webview-ui/src/components/Announcement.tsx @@ -32,8 +32,8 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { applications or fix bugs with screenshots