Added new models

This commit is contained in:
2025-04-17 07:09:34 +09:00
parent 9b6e5a0941
commit fbde7d28c2
2 changed files with 28 additions and 86 deletions

View File

@@ -0,0 +1,16 @@
{
"gpt-4.1": { "prompt": 2.0, "completion": 8.0, "max": 131072 },
"gpt-4.1-mini": { "prompt": 0.4, "completion": 1.6, "max": 131072 },
"gpt-4o-mini": { "prompt": 0.15, "completion": 0.6, "max": 131072 },
"gpt-4o": { "prompt": 2.5, "completion": 10.0, "max": 131072 },
"o1-mini": { "prompt": 1.1, "completion": 4.4, "max": 131072, "reasoning": true },
"o1": { "prompt": 15.0, "completion": 60.0, "max": 200000, "reasoning": true },
"o3-mini": { "prompt": 1.1, "completion": 4.4, "max": 200000, "reasoning": true },
"o3": { "prompt": 10.0, "completion": 40.0, "max": 200000, "reasoning": true },
"o4-mini": { "prompt": 1.1, "completion": 4.4, "max": 200000, "reasoning": true },
"claude-3-7-sonnet-20250219": { "prompt": 3.0, "completion": 15.0, "max": 200000 },
"claude-3-5-sonnet-20241022": { "prompt": 3.75, "completion": 15.0, "max": 200000 },
"claude-3-5-haiku-20241022": { "prompt": 1.0, "completion": 4.0, "max": 200000 },
"deepseek-r1-distill-qwen-32b": { "prompt": 0.69, "completion": 0.69, "max": 16384 },
"deepseek-r1-distill-llama-70b": { "prompt": 3.0, "completion": 3.0, "max": 4096 }
}

View File

@@ -9,6 +9,7 @@
import { checkModel } from "./util.svelte"; import { checkModel } from "./util.svelte";
import { encode } from "gpt-tokenizer"; import { encode } from "gpt-tokenizer";
import { get } from "svelte/store"; import { get } from "svelte/store";
import chatModelsJson from './models.json';
const hiddenSettings = { const hiddenSettings = {
startSequence: true, startSequence: true,
@@ -53,92 +54,17 @@
}, },
} as ModelDetail; } as ModelDetail;
export const chatModels: Record<string, ModelDetail> = { export const chatModels: Record<string, ModelDetail> = {};
// OpenAI Models for (const [key, { prompt, completion, max, reasoning }] of Object.entries(chatModelsJson)) {
chatModels[key] = {
"gpt-4o-mini": {
...chatModelBase, ...chatModelBase,
prompt: 0.15 / 1_000_000, prompt: prompt / 1_000_000,
completion: 0.6 / 1_000_000, completion: completion / 1_000_000,
max: 131072, max,
}, ...(reasoning ? { reasoning } : {}),
"gpt-4o": {
...chatModelBase,
prompt: 2.5 / 1_000_000,
completion: 10 / 1_000_000,
max: 131072,
},
"gpt-4.1": {
...chatModelBase,
prompt: 2.0 / 1_000_000,
completion: 8.0 / 1_000_000,
max: 131072,
},
"gpt-4.1-mini": {
...chatModelBase,
prompt: 0.4 / 1_000_000,
completion: 1.6 / 1_000_000,
max: 131072,
},
"o1-mini": {
...chatModelBase,
reasoning: true,
prompt: 1.1 / 1_000_000,
completion: 4.4 / 1_000_000,
max: 131072,
},
"o1": {
...chatModelBase,
reasoning: true,
prompt: 15 / 1_000_000,
completion: 60 / 1_000_000,
max: 200000,
},
"o3-mini": {
...chatModelBase,
reasoning: true,
prompt: 1.1 / 1_000_000,
completion: 4.4 / 1_000_000,
max: 200000,
},
// Anthropic Models
"claude-3-7-sonnet-20250219": {
...chatModelBase,
prompt: 3 / 1_000_000,
completion: 15 / 1_000_000,
max: 200000,
},
"claude-3-5-sonnet-20241022": {
...chatModelBase,
prompt: 3.75 / 1_000_000,
completion: 15.0 / 1_000_000,
max: 200000,
},
"claude-3-5-haiku-20241022": {
...chatModelBase,
prompt: 1 / 1_000_000,
completion: 4 / 1_000_000,
max: 200000,
},
// Groq Models
"deepseek-r1-distill-qwen-32b": {
...chatModelBase,
prompt: 0.69 / 1_000_000,
completion: 0.69 / 1_000_000,
max: 16384,
},
"deepseek-r1-distill-llama-70b": {
...chatModelBase,
prompt: 3 / 1_000_000,
completion: 3 / 1_000_000,
max: 4096,
},
}; };
}
const imageModelBase = { const imageModelBase = {
type: "image", type: "image",