Remove unusable models; minor fixes

This commit is contained in:
Saoud Rizwan
2024-08-11 03:24:10 -04:00
parent 3c082e753b
commit 6454163078
4 changed files with 52 additions and 59 deletions

View File

@@ -353,7 +353,7 @@ export class ClaudeDev {
let totalInputTokens = 0 let totalInputTokens = 0
let totalOutputTokens = 0 let totalOutputTokens = 0
while (this.requestCount < this.maxRequestsPerTask) { while (!this.abort) {
const { didEndLoop, inputTokens, outputTokens } = await this.recursivelyMakeClaudeRequests([ const { didEndLoop, inputTokens, outputTokens } = await this.recursivelyMakeClaudeRequests([
textBlock, textBlock,
...imageBlocks, ...imageBlocks,
@@ -366,7 +366,7 @@ export class ClaudeDev {
//const totalCost = this.calculateApiCost(totalInputTokens, totalOutputTokens) //const totalCost = this.calculateApiCost(totalInputTokens, totalOutputTokens)
if (didEndLoop) { if (didEndLoop) {
// for now this never happens // For now a task never 'completes'. This will only happen if the user hits max requests and denies resetting the count.
//this.say("task_completed", `Task completed. Total API usage cost: ${totalCost}`) //this.say("task_completed", `Task completed. Total API usage cost: ${totalCost}`)
break break
} else { } else {

View File

@@ -133,24 +133,25 @@ export const openRouterModels = {
inputPrice: 10, inputPrice: 10,
outputPrice: 30, outputPrice: 30,
}, },
"meta-llama/llama-3.1-405b-instruct": { // llama 3.1 models cannot use tools yet
maxTokens: 2048, // "meta-llama/llama-3.1-405b-instruct": {
supportsImages: false, // maxTokens: 2048,
inputPrice: 2.7, // supportsImages: false,
outputPrice: 2.7, // inputPrice: 2.7,
}, // outputPrice: 2.7,
"meta-llama/llama-3.1-70b-instruct": { // },
maxTokens: 2048, // "meta-llama/llama-3.1-70b-instruct": {
supportsImages: false, // maxTokens: 2048,
inputPrice: 0.52, // supportsImages: false,
outputPrice: 0.75, // inputPrice: 0.52,
}, // outputPrice: 0.75,
"meta-llama/llama-3.1-8b-instruct": { // },
maxTokens: 2048, // "meta-llama/llama-3.1-8b-instruct": {
supportsImages: false, // maxTokens: 2048,
inputPrice: 0.06, // supportsImages: false,
outputPrice: 0.06, // inputPrice: 0.06,
}, // outputPrice: 0.06,
// },
"google/gemini-pro-1.5": { "google/gemini-pro-1.5": {
maxTokens: 8192, maxTokens: 8192,
supportsImages: true, supportsImages: true,
@@ -163,46 +164,38 @@ export const openRouterModels = {
inputPrice: 0.25, inputPrice: 0.25,
outputPrice: 0.75, outputPrice: 0.75,
}, },
// 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,
supportsImages: false, supportsImages: false,
inputPrice: 0.14, inputPrice: 0.14,
outputPrice: 0.28, outputPrice: 0.28,
}, },
// mistral models can use tools but aren't great at going step-by-step and proceeding to the next step
"mistralai/mistral-large": { "mistralai/mistral-large": {
maxTokens: 8192, maxTokens: 8192,
supportsImages: false, supportsImages: false,
inputPrice: 3, inputPrice: 3,
outputPrice: 9, outputPrice: 9,
}, },
"mistralai/mistral-medium": { // This model is not capable of complex system/tool prompts
maxTokens: 4096, // "mistralai/mistral-7b-instruct-v0.1": {
supportsImages: false, // maxTokens: 4096,
inputPrice: 2.7, // supportsImages: false,
outputPrice: 8.1, // inputPrice: 0.06,
}, // outputPrice: 0.06,
"mistralai/mistral-small": { // },
maxTokens: 4096, // cohere models are not capable of complex system/tool prompts
supportsImages: false, // "cohere/command-r-plus": {
inputPrice: 2, // maxTokens: 4000,
outputPrice: 6, // supportsImages: false,
}, // inputPrice: 3,
"mistralai/mistral-7b-instruct-v0.1": { // outputPrice: 15,
maxTokens: 4096, // },
supportsImages: false, // "cohere/command-r": {
inputPrice: 0.06, // maxTokens: 4000,
outputPrice: 0.06, // supportsImages: false,
}, // inputPrice: 0.5,
"cohere/command-r-plus": { // outputPrice: 1.5,
maxTokens: 4000, // },
supportsImages: false,
inputPrice: 3,
outputPrice: 15,
},
"cohere/command-r": {
maxTokens: 4000,
supportsImages: false,
inputPrice: 0.5,
outputPrice: 1.5,
},
} as const satisfies Record<string, ModelInfo> } as const satisfies Record<string, ModelInfo>

View File

@@ -146,15 +146,15 @@ const ApiOptions: React.FC<ApiOptionsProps> = ({ showModelOptions, apiConfigurat
<VSCodeOption value="">Select a region...</VSCodeOption> <VSCodeOption value="">Select a region...</VSCodeOption>
{/* The user will have to choose a region that supports the model they use, but this shouldn't be a problem since they'd have to request access for it in that region in the first place. */} {/* The user will have to choose a region that supports the model they use, but this shouldn't be a problem since they'd have to request access for it in that region in the first place. */}
<VSCodeOption value="us-east-1">US East (N. Virginia)</VSCodeOption> <VSCodeOption value="us-east-1">US East (N. Virginia)</VSCodeOption>
<VSCodeOption value="us-east-2">US East (Ohio)</VSCodeOption> {/* <VSCodeOption value="us-east-2">US East (Ohio)</VSCodeOption> */}
<VSCodeOption value="us-west-1">US West (N. California)</VSCodeOption> {/* <VSCodeOption value="us-west-1">US West (N. California)</VSCodeOption> */}
<VSCodeOption value="us-west-2">US West (Oregon)</VSCodeOption> <VSCodeOption value="us-west-2">US West (Oregon)</VSCodeOption>
<VSCodeOption value="af-south-1">Africa (Cape Town)</VSCodeOption> {/* <VSCodeOption value="af-south-1">Africa (Cape Town)</VSCodeOption> */}
<VSCodeOption value="ap-east-1">Asia Pacific (Hong Kong)</VSCodeOption> {/* <VSCodeOption value="ap-east-1">Asia Pacific (Hong Kong)</VSCodeOption> */}
<VSCodeOption value="ap-south-1">Asia Pacific (Mumbai)</VSCodeOption> <VSCodeOption value="ap-south-1">Asia Pacific (Mumbai)</VSCodeOption>
<VSCodeOption value="ap-northeast-1">Asia Pacific (Tokyo)</VSCodeOption> <VSCodeOption value="ap-northeast-1">Asia Pacific (Tokyo)</VSCodeOption>
<VSCodeOption value="ap-northeast-2">Asia Pacific (Seoul)</VSCodeOption> {/* <VSCodeOption value="ap-northeast-2">Asia Pacific (Seoul)</VSCodeOption> */}
<VSCodeOption value="ap-northeast-3">Asia Pacific (Osaka)</VSCodeOption> {/* <VSCodeOption value="ap-northeast-3">Asia Pacific (Osaka)</VSCodeOption> */}
<VSCodeOption value="ap-southeast-1">Asia Pacific (Singapore)</VSCodeOption> <VSCodeOption value="ap-southeast-1">Asia Pacific (Singapore)</VSCodeOption>
<VSCodeOption value="ap-southeast-2">Asia Pacific (Sydney)</VSCodeOption> <VSCodeOption value="ap-southeast-2">Asia Pacific (Sydney)</VSCodeOption>
<VSCodeOption value="ca-central-1">Canada (Central)</VSCodeOption> <VSCodeOption value="ca-central-1">Canada (Central)</VSCodeOption>
@@ -162,8 +162,8 @@ const ApiOptions: React.FC<ApiOptionsProps> = ({ showModelOptions, apiConfigurat
<VSCodeOption value="eu-west-1">Europe (Ireland)</VSCodeOption> <VSCodeOption value="eu-west-1">Europe (Ireland)</VSCodeOption>
<VSCodeOption value="eu-west-2">Europe (London)</VSCodeOption> <VSCodeOption value="eu-west-2">Europe (London)</VSCodeOption>
<VSCodeOption value="eu-west-3">Europe (Paris)</VSCodeOption> <VSCodeOption value="eu-west-3">Europe (Paris)</VSCodeOption>
<VSCodeOption value="eu-north-1">Europe (Stockholm)</VSCodeOption> {/* <VSCodeOption value="eu-north-1">Europe (Stockholm)</VSCodeOption> */}
<VSCodeOption value="me-south-1">Middle East (Bahrain)</VSCodeOption> {/* <VSCodeOption value="me-south-1">Middle East (Bahrain)</VSCodeOption> */}
<VSCodeOption value="sa-east-1">South America (São Paulo)</VSCodeOption> <VSCodeOption value="sa-east-1">South America (São Paulo)</VSCodeOption>
</VSCodeDropdown> </VSCodeDropdown>
</div> </div>

View File

@@ -610,7 +610,7 @@ const ChatView = ({
style={{ marginRight: "4px" }}> style={{ marginRight: "4px" }}>
<span <span
className="codicon codicon-device-camera" className="codicon codicon-device-camera"
style={{ fontSize: 18, marginLeft: -2, marginBottom: 1 }}></span> style={{ fontSize: 18.5, marginLeft: -2, marginBottom: 1.5 }}></span>
</VSCodeButton> </VSCodeButton>
<VSCodeButton <VSCodeButton
disabled={textAreaDisabled} disabled={textAreaDisabled}