|
| 1 | +import type { ModelInfo } from "../model.js" |
| 2 | + |
| 3 | +// Default fallback values for CometAPI when model metadata is not yet loaded. |
| 4 | +export const cometApiDefaultModelId = "gpt-5-chat-latest" |
| 5 | + |
| 6 | +export const cometApiDefaultModelInfo: ModelInfo = { |
| 7 | + maxTokens: 16384, |
| 8 | + contextWindow: 128000, |
| 9 | + supportsImages: true, |
| 10 | + supportsPromptCache: false, |
| 11 | + inputPrice: 2.5, |
| 12 | + outputPrice: 10, |
| 13 | + description: "GPT-5 Chat Latest model with 128K context window.", |
| 14 | +} |
| 15 | + |
| 16 | +// Fallback models for CometAPI when the API is unavailable |
| 17 | +export const COMETAPI_MODELS: Record<string, ModelInfo> = { |
| 18 | + // GPT series |
| 19 | + "gpt-5-chat-latest": { |
| 20 | + maxTokens: 16384, |
| 21 | + contextWindow: 128000, |
| 22 | + supportsImages: true, |
| 23 | + supportsPromptCache: false, |
| 24 | + inputPrice: 2.5, |
| 25 | + outputPrice: 10, |
| 26 | + description: "GPT-5 Chat Latest - Most advanced GPT model", |
| 27 | + }, |
| 28 | + "chatgpt-4o-latest": { |
| 29 | + maxTokens: 16384, |
| 30 | + contextWindow: 128000, |
| 31 | + supportsImages: true, |
| 32 | + supportsPromptCache: false, |
| 33 | + inputPrice: 2.5, |
| 34 | + outputPrice: 10, |
| 35 | + description: "ChatGPT-4o Latest - Advanced multimodal model", |
| 36 | + }, |
| 37 | + "gpt-5-mini": { |
| 38 | + maxTokens: 16384, |
| 39 | + contextWindow: 128000, |
| 40 | + supportsImages: true, |
| 41 | + supportsPromptCache: false, |
| 42 | + inputPrice: 0.15, |
| 43 | + outputPrice: 0.6, |
| 44 | + description: "GPT-5 Mini - Efficient and cost-effective", |
| 45 | + }, |
| 46 | + "gpt-5-nano": { |
| 47 | + maxTokens: 8192, |
| 48 | + contextWindow: 128000, |
| 49 | + supportsImages: false, |
| 50 | + supportsPromptCache: false, |
| 51 | + inputPrice: 0.075, |
| 52 | + outputPrice: 0.3, |
| 53 | + description: "GPT-5 Nano - Ultra-efficient for simple tasks", |
| 54 | + }, |
| 55 | + "gpt-4.1-mini": { |
| 56 | + maxTokens: 16384, |
| 57 | + contextWindow: 128000, |
| 58 | + supportsImages: true, |
| 59 | + supportsPromptCache: false, |
| 60 | + inputPrice: 0.15, |
| 61 | + outputPrice: 0.6, |
| 62 | + description: "GPT-4.1 Mini - Balanced performance and cost", |
| 63 | + }, |
| 64 | + "gpt-4o-mini": { |
| 65 | + maxTokens: 16384, |
| 66 | + contextWindow: 128000, |
| 67 | + supportsImages: true, |
| 68 | + supportsPromptCache: false, |
| 69 | + inputPrice: 0.15, |
| 70 | + outputPrice: 0.6, |
| 71 | + description: "GPT-4o Mini - Efficient multimodal model", |
| 72 | + }, |
| 73 | + |
| 74 | + // Claude series |
| 75 | + "claude-opus-4-1-20250805": { |
| 76 | + maxTokens: 8192, |
| 77 | + contextWindow: 200000, |
| 78 | + supportsImages: true, |
| 79 | + supportsPromptCache: true, |
| 80 | + inputPrice: 3, |
| 81 | + outputPrice: 15, |
| 82 | + description: "Claude Opus 4.1 - Most capable Claude model", |
| 83 | + }, |
| 84 | + "claude-sonnet-4-20250514": { |
| 85 | + maxTokens: 8192, |
| 86 | + contextWindow: 200000, |
| 87 | + supportsImages: true, |
| 88 | + supportsPromptCache: true, |
| 89 | + inputPrice: 1.5, |
| 90 | + outputPrice: 7.5, |
| 91 | + description: "Claude Sonnet 4 - Balanced Claude model", |
| 92 | + }, |
| 93 | + "claude-3-7-sonnet-latest": { |
| 94 | + maxTokens: 8192, |
| 95 | + contextWindow: 200000, |
| 96 | + supportsImages: true, |
| 97 | + supportsPromptCache: true, |
| 98 | + inputPrice: 3, |
| 99 | + outputPrice: 15, |
| 100 | + description: "Claude 3.7 Sonnet - Latest Sonnet version", |
| 101 | + }, |
| 102 | + "claude-3-5-haiku-latest": { |
| 103 | + maxTokens: 8192, |
| 104 | + contextWindow: 200000, |
| 105 | + supportsImages: true, |
| 106 | + supportsPromptCache: true, |
| 107 | + inputPrice: 0.25, |
| 108 | + outputPrice: 1.25, |
| 109 | + description: "Claude 3.5 Haiku - Fast and efficient", |
| 110 | + }, |
| 111 | + |
| 112 | + // Gemini series |
| 113 | + "gemini-2.5-pro": { |
| 114 | + maxTokens: 8192, |
| 115 | + contextWindow: 2097152, |
| 116 | + supportsImages: true, |
| 117 | + supportsPromptCache: false, |
| 118 | + inputPrice: 1.25, |
| 119 | + outputPrice: 5, |
| 120 | + description: "Gemini 2.5 Pro - Google's most capable model", |
| 121 | + }, |
| 122 | + "gemini-2.5-flash": { |
| 123 | + maxTokens: 8192, |
| 124 | + contextWindow: 1048576, |
| 125 | + supportsImages: true, |
| 126 | + supportsPromptCache: false, |
| 127 | + inputPrice: 0.075, |
| 128 | + outputPrice: 0.3, |
| 129 | + description: "Gemini 2.5 Flash - Fast and efficient", |
| 130 | + }, |
| 131 | + "gemini-2.0-flash": { |
| 132 | + maxTokens: 8192, |
| 133 | + contextWindow: 1048576, |
| 134 | + supportsImages: true, |
| 135 | + supportsPromptCache: false, |
| 136 | + inputPrice: 0.075, |
| 137 | + outputPrice: 0.3, |
| 138 | + description: "Gemini 2.0 Flash - Previous generation flash model", |
| 139 | + }, |
| 140 | + |
| 141 | + // DeepSeek series |
| 142 | + "deepseek-v3.1": { |
| 143 | + maxTokens: 8192, |
| 144 | + contextWindow: 128000, |
| 145 | + supportsImages: false, |
| 146 | + supportsPromptCache: false, |
| 147 | + inputPrice: 0.14, |
| 148 | + outputPrice: 0.28, |
| 149 | + description: "DeepSeek V3.1 - Advanced reasoning model", |
| 150 | + }, |
| 151 | + "deepseek-r1-0528": { |
| 152 | + maxTokens: 8192, |
| 153 | + contextWindow: 128000, |
| 154 | + supportsImages: false, |
| 155 | + supportsPromptCache: false, |
| 156 | + supportsReasoningEffort: true, |
| 157 | + inputPrice: 0.55, |
| 158 | + outputPrice: 2.19, |
| 159 | + description: "DeepSeek R1 - Reasoning-focused model", |
| 160 | + }, |
| 161 | + "deepseek-reasoner": { |
| 162 | + maxTokens: 8192, |
| 163 | + contextWindow: 128000, |
| 164 | + supportsImages: false, |
| 165 | + supportsPromptCache: false, |
| 166 | + supportsReasoningEffort: true, |
| 167 | + inputPrice: 0.55, |
| 168 | + outputPrice: 2.19, |
| 169 | + description: "DeepSeek Reasoner - Advanced reasoning capabilities", |
| 170 | + }, |
| 171 | + |
| 172 | + // Other popular models |
| 173 | + "grok-4-0709": { |
| 174 | + maxTokens: 8192, |
| 175 | + contextWindow: 128000, |
| 176 | + supportsImages: true, |
| 177 | + supportsPromptCache: false, |
| 178 | + inputPrice: 5, |
| 179 | + outputPrice: 15, |
| 180 | + description: "Grok 4 - xAI's advanced model", |
| 181 | + }, |
| 182 | + "qwen3-30b-a3b": { |
| 183 | + maxTokens: 8192, |
| 184 | + contextWindow: 32768, |
| 185 | + supportsImages: false, |
| 186 | + supportsPromptCache: false, |
| 187 | + inputPrice: 0.5, |
| 188 | + outputPrice: 1.5, |
| 189 | + description: "Qwen3 30B - Alibaba's large language model", |
| 190 | + }, |
| 191 | + "qwen3-coder-plus-2025-07-22": { |
| 192 | + maxTokens: 8192, |
| 193 | + contextWindow: 32768, |
| 194 | + supportsImages: false, |
| 195 | + supportsPromptCache: false, |
| 196 | + inputPrice: 0.5, |
| 197 | + outputPrice: 1.5, |
| 198 | + description: "Qwen3 Coder Plus - Specialized for coding tasks", |
| 199 | + }, |
| 200 | +} |
0 commit comments