|
| 1 | +import type { ModelInfo } from "../model.js" |
| 2 | +import type { SiliconCloudApiLine } from "../provider-settings.js" |
| 3 | + |
| 4 | +export const siliconCloudDefaultModelId = "zai-org/GLM-4.6" |
| 5 | + |
| 6 | +export const siliconCloudApiLineConfigs = { |
| 7 | + china: { name: "国内版", baseUrl: "https://api.siliconflow.cn/v1" }, |
| 8 | + "china-overseas": { name: "国内版(海外访问)", baseUrl: "https://api-st.siliconflow.cn/v1" }, |
| 9 | + international: { name: "国际版", baseUrl: "https://api.siliconflow.com/v1" }, |
| 10 | +} satisfies Record<SiliconCloudApiLine, { name: string; baseUrl: string }> |
| 11 | + |
| 12 | +const siliconCloudChinaModels: Record<string, ModelInfo> = { |
| 13 | + "Pro/deepseek-ai/DeepSeek-V3.1-Terminus": { |
| 14 | + contextWindow: 163840, |
| 15 | + maxTokens: 8192, |
| 16 | + supportsImages: false, |
| 17 | + supportsPromptCache: false, |
| 18 | + inputPrice: 0.14, |
| 19 | + outputPrice: 0.28, |
| 20 | + supportsReasoningBudget: true, |
| 21 | + }, |
| 22 | + "zai-org/GLM-4.6": { |
| 23 | + contextWindow: 131072, |
| 24 | + maxTokens: 8192, |
| 25 | + supportsImages: false, |
| 26 | + supportsPromptCache: false, |
| 27 | + inputPrice: 0, |
| 28 | + outputPrice: 0, |
| 29 | + supportsReasoningBudget: true, |
| 30 | + }, |
| 31 | + "Qwen/QwQ-32B-Preview": { |
| 32 | + contextWindow: 32768, |
| 33 | + maxTokens: 32768, |
| 34 | + supportsImages: false, |
| 35 | + supportsPromptCache: false, |
| 36 | + inputPrice: 0, |
| 37 | + outputPrice: 0, |
| 38 | + supportsReasoningBudget: true, |
| 39 | + }, |
| 40 | + "Qwen/Qwen2.5-Coder-32B-Instruct": { |
| 41 | + contextWindow: 131072, |
| 42 | + maxTokens: 8192, |
| 43 | + supportsImages: false, |
| 44 | + supportsPromptCache: false, |
| 45 | + inputPrice: 0, |
| 46 | + outputPrice: 0, |
| 47 | + }, |
| 48 | + "deepseek-ai/DeepSeek-V2.5": { |
| 49 | + contextWindow: 131072, |
| 50 | + maxTokens: 8192, |
| 51 | + supportsImages: false, |
| 52 | + supportsPromptCache: false, |
| 53 | + inputPrice: 0.14, |
| 54 | + outputPrice: 0.28, |
| 55 | + }, |
| 56 | + "deepseek-ai/DeepSeek-Coder-V2-Instruct": { |
| 57 | + contextWindow: 131072, |
| 58 | + maxTokens: 8192, |
| 59 | + supportsImages: false, |
| 60 | + supportsPromptCache: false, |
| 61 | + inputPrice: 0.14, |
| 62 | + outputPrice: 0.28, |
| 63 | + }, |
| 64 | + "Qwen/Qwen2.5-72B-Instruct": { |
| 65 | + contextWindow: 131072, |
| 66 | + maxTokens: 8192, |
| 67 | + supportsImages: false, |
| 68 | + supportsPromptCache: false, |
| 69 | + inputPrice: 0.35, |
| 70 | + outputPrice: 1.4, |
| 71 | + }, |
| 72 | + "meta-llama/Meta-Llama-3.1-70B-Instruct": { |
| 73 | + contextWindow: 131072, |
| 74 | + maxTokens: 8192, |
| 75 | + supportsImages: false, |
| 76 | + supportsPromptCache: false, |
| 77 | + inputPrice: 0.35, |
| 78 | + outputPrice: 0.42, |
| 79 | + }, |
| 80 | + "meta-llama/Meta-Llama-3.1-405B-Instruct": { |
| 81 | + contextWindow: 131072, |
| 82 | + maxTokens: 8192, |
| 83 | + supportsImages: false, |
| 84 | + supportsPromptCache: false, |
| 85 | + inputPrice: 2.1, |
| 86 | + outputPrice: 2.1, |
| 87 | + }, |
| 88 | + "google/gemma-2-27b-it": { |
| 89 | + contextWindow: 8192, |
| 90 | + maxTokens: 8192, |
| 91 | + supportsImages: false, |
| 92 | + supportsPromptCache: false, |
| 93 | + inputPrice: 0.14, |
| 94 | + outputPrice: 0.28, |
| 95 | + }, |
| 96 | + "01-ai/Yi-1.5-34B-Chat-16K": { |
| 97 | + contextWindow: 16384, |
| 98 | + maxTokens: 4096, |
| 99 | + supportsImages: false, |
| 100 | + supportsPromptCache: false, |
| 101 | + inputPrice: 0.14, |
| 102 | + outputPrice: 0.84, |
| 103 | + }, |
| 104 | + "internlm/internlm2_5-20b-chat": { |
| 105 | + contextWindow: 32768, |
| 106 | + maxTokens: 8192, |
| 107 | + supportsImages: false, |
| 108 | + supportsPromptCache: false, |
| 109 | + inputPrice: 0.14, |
| 110 | + outputPrice: 0.28, |
| 111 | + }, |
| 112 | +} |
| 113 | + |
| 114 | +const siliconCloudChinaOverseasModels: Record<string, ModelInfo> = { |
| 115 | + ...siliconCloudChinaModels, |
| 116 | +} |
| 117 | + |
| 118 | +const siliconCloudInternationalModels: Record<string, ModelInfo> = { |
| 119 | + "Pro/deepseek-ai/DeepSeek-V3.1-Terminus": { |
| 120 | + contextWindow: 163840, |
| 121 | + maxTokens: 8192, |
| 122 | + supportsImages: false, |
| 123 | + supportsPromptCache: false, |
| 124 | + inputPrice: 0.02, |
| 125 | + outputPrice: 0.04, |
| 126 | + supportsReasoningBudget: true, |
| 127 | + }, |
| 128 | + "zai-org/GLM-4.6": { |
| 129 | + contextWindow: 131072, |
| 130 | + maxTokens: 8192, |
| 131 | + supportsImages: false, |
| 132 | + supportsPromptCache: false, |
| 133 | + inputPrice: 0, |
| 134 | + outputPrice: 0, |
| 135 | + supportsReasoningBudget: true, |
| 136 | + }, |
| 137 | + "Qwen/QwQ-32B-Preview": { |
| 138 | + contextWindow: 32768, |
| 139 | + maxTokens: 32768, |
| 140 | + supportsImages: false, |
| 141 | + supportsPromptCache: false, |
| 142 | + inputPrice: 0, |
| 143 | + outputPrice: 0, |
| 144 | + supportsReasoningBudget: true, |
| 145 | + }, |
| 146 | + "Qwen/Qwen2.5-Coder-32B-Instruct": { |
| 147 | + contextWindow: 131072, |
| 148 | + maxTokens: 8192, |
| 149 | + supportsImages: false, |
| 150 | + supportsPromptCache: false, |
| 151 | + inputPrice: 0, |
| 152 | + outputPrice: 0, |
| 153 | + }, |
| 154 | + "deepseek-ai/DeepSeek-V2.5": { |
| 155 | + contextWindow: 131072, |
| 156 | + maxTokens: 8192, |
| 157 | + supportsImages: false, |
| 158 | + supportsPromptCache: false, |
| 159 | + inputPrice: 0.02, |
| 160 | + outputPrice: 0.04, |
| 161 | + }, |
| 162 | + "deepseek-ai/DeepSeek-Coder-V2-Instruct": { |
| 163 | + contextWindow: 131072, |
| 164 | + maxTokens: 8192, |
| 165 | + supportsImages: false, |
| 166 | + supportsPromptCache: false, |
| 167 | + inputPrice: 0.02, |
| 168 | + outputPrice: 0.04, |
| 169 | + }, |
| 170 | + "Qwen/Qwen2.5-72B-Instruct": { |
| 171 | + contextWindow: 131072, |
| 172 | + maxTokens: 8192, |
| 173 | + supportsImages: false, |
| 174 | + supportsPromptCache: false, |
| 175 | + inputPrice: 0.05, |
| 176 | + outputPrice: 0.2, |
| 177 | + }, |
| 178 | + "meta-llama/Meta-Llama-3.1-70B-Instruct": { |
| 179 | + contextWindow: 131072, |
| 180 | + maxTokens: 8192, |
| 181 | + supportsImages: false, |
| 182 | + supportsPromptCache: false, |
| 183 | + inputPrice: 0.05, |
| 184 | + outputPrice: 0.06, |
| 185 | + }, |
| 186 | + "meta-llama/Meta-Llama-3.1-405B-Instruct": { |
| 187 | + contextWindow: 131072, |
| 188 | + maxTokens: 8192, |
| 189 | + supportsImages: false, |
| 190 | + supportsPromptCache: false, |
| 191 | + inputPrice: 0.3, |
| 192 | + outputPrice: 0.3, |
| 193 | + }, |
| 194 | + "google/gemma-2-27b-it": { |
| 195 | + contextWindow: 8192, |
| 196 | + maxTokens: 8192, |
| 197 | + supportsImages: false, |
| 198 | + supportsPromptCache: false, |
| 199 | + inputPrice: 0.02, |
| 200 | + outputPrice: 0.04, |
| 201 | + }, |
| 202 | + "01-ai/Yi-1.5-34B-Chat-16K": { |
| 203 | + contextWindow: 16384, |
| 204 | + maxTokens: 4096, |
| 205 | + supportsImages: false, |
| 206 | + supportsPromptCache: false, |
| 207 | + inputPrice: 0.02, |
| 208 | + outputPrice: 0.12, |
| 209 | + }, |
| 210 | + "internlm/internlm2_5-20b-chat": { |
| 211 | + contextWindow: 32768, |
| 212 | + maxTokens: 8192, |
| 213 | + supportsImages: false, |
| 214 | + supportsPromptCache: false, |
| 215 | + inputPrice: 0.02, |
| 216 | + outputPrice: 0.04, |
| 217 | + }, |
| 218 | +} |
| 219 | + |
| 220 | +export const siliconCloudModelsByApiLine = { |
| 221 | + china: siliconCloudChinaModels, |
| 222 | + "china-overseas": siliconCloudChinaOverseasModels, |
| 223 | + international: siliconCloudInternationalModels, |
| 224 | +} satisfies Record<SiliconCloudApiLine, Record<string, ModelInfo>> |
| 225 | + |
| 226 | +// Export all models for the default list |
| 227 | +export const siliconCloudModels = siliconCloudChinaModels |
| 228 | + |
| 229 | +export type SiliconCloudModelId = keyof typeof siliconCloudModels |
0 commit comments