Remove unusable models; default to OpenRouter for new users; update Announcement

This commit is contained in:
Saoud Rizwan
2024-08-11 15:37:09 -04:00
parent ecc5eb30a5
commit f93e7946aa
5 changed files with 31 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ All notable changes to the "claude-dev" extension will be documented in this fil
## [1.1.1] ## [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] ## [1.1.0]

View File

@@ -152,18 +152,25 @@ export const openRouterModels = {
// inputPrice: 0.06, // inputPrice: 0.06,
// outputPrice: 0.06, // outputPrice: 0.06,
// }, // },
"google/gemini-pro-1.5": { // 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.")
maxTokens: 8192, // "google/gemini-pro-1.5": {
supportsImages: true, // maxTokens: 8192,
inputPrice: 2.5, // supportsImages: false, // "Function Calling is not supported with non-text input"
outputPrice: 7.5, // inputPrice: 2.5,
}, // outputPrice: 7.5,
"google/gemini-flash-1.5": { // },
maxTokens: 8192, // "google/gemini-flash-1.5": {
supportsImages: true, // maxTokens: 8192,
inputPrice: 0.25, // supportsImages: false, // "Function Calling is not supported with non-text input"
outputPrice: 0.75, // 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 // while deepseek coder can use tools, it may sometimes send tool invocation as a text block
"deepseek/deepseek-coder": { "deepseek/deepseek-coder": {
maxTokens: 4096, maxTokens: 4096,

View File

@@ -32,8 +32,8 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
applications or fix bugs with screenshots applications or fix bugs with screenshots
</li> </li>
<li> <li>
Added a settings option to choose other Claude models (+ GPT-4o, Gemini, DeepSeek, and Mistral if Added a settings option to choose other Claude models (+ GPT-4o, DeepSeek, and Mistral if you use
you use OpenRouter) OpenRouter)
</li> </li>
<li> <li>
Improved support for running interactive terminal commands and long-running processes like servers Improved support for running interactive terminal commands and long-running processes like servers

View File

@@ -66,8 +66,8 @@ const ApiOptions: React.FC<ApiOptionsProps> = ({ showModelOptions, apiConfigurat
<span style={{ fontWeight: 500 }}>API Provider</span> <span style={{ fontWeight: 500 }}>API Provider</span>
</label> </label>
<VSCodeDropdown id="api-provider" value={selectedProvider} onChange={handleInputChange("apiProvider")}> <VSCodeDropdown id="api-provider" value={selectedProvider} onChange={handleInputChange("apiProvider")}>
<VSCodeOption value="anthropic">Anthropic</VSCodeOption>
<VSCodeOption value="openrouter">OpenRouter</VSCodeOption> <VSCodeOption value="openrouter">OpenRouter</VSCodeOption>
<VSCodeOption value="anthropic">Anthropic</VSCodeOption>
<VSCodeOption value="bedrock">AWS Bedrock</VSCodeOption> <VSCodeOption value="bedrock">AWS Bedrock</VSCodeOption>
</VSCodeDropdown> </VSCodeDropdown>
</div> </div>

View File

@@ -4,6 +4,7 @@ import React, { useEffect, useState } from "react"
import { validateApiConfiguration } from "../utils/validate" import { validateApiConfiguration } from "../utils/validate"
import { vscode } from "../utils/vscode" import { vscode } from "../utils/vscode"
import ApiOptions from "./ApiOptions" import ApiOptions from "./ApiOptions"
import { useEffectOnce } from "react-use"
interface WelcomeViewProps { interface WelcomeViewProps {
apiConfiguration?: ApiConfiguration apiConfiguration?: ApiConfiguration
@@ -23,6 +24,13 @@ const WelcomeView: React.FC<WelcomeViewProps> = ({ apiConfiguration, setApiConfi
setApiErrorMessage(validateApiConfiguration(apiConfiguration)) setApiErrorMessage(validateApiConfiguration(apiConfiguration))
}, [apiConfiguration]) }, [apiConfiguration])
useEffectOnce(() => {
setApiConfiguration((prevConfig) => ({
...prevConfig,
apiProvider: "openrouter",
}))
})
return ( return (
<div style={{ position: "fixed", top: 0, left: 0, right: 0, bottom: 0, padding: "0 20px" }}> <div style={{ position: "fixed", top: 0, left: 0, right: 0, bottom: 0, padding: "0 20px" }}>
<h2>Hi, I'm Claude Dev</h2> <h2>Hi, I'm Claude Dev</h2>