@austinthesing/magic-shell 0.2.22 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +109 -368
- package/dist/index.js +110 -408
- package/dist/tui.js +109 -368
- package/package.json +1 -1
package/dist/tui.js
CHANGED
|
@@ -33056,20 +33056,13 @@ import { cwd as getCwd } from "process";
|
|
|
33056
33056
|
// src/lib/models.ts
|
|
33057
33057
|
var OPENROUTER_MODELS = [
|
|
33058
33058
|
{
|
|
33059
|
-
id: "
|
|
33060
|
-
name: "
|
|
33061
|
-
description: "
|
|
33059
|
+
id: "deepseek/deepseek-v4-flash:free",
|
|
33060
|
+
name: "DeepSeek V4 Flash (Free)",
|
|
33061
|
+
description: "DeepSeek's fast open-source model on OpenRouter's free tier (rate-limited)",
|
|
33062
33062
|
category: "fast",
|
|
33063
33063
|
provider: "openrouter",
|
|
33064
|
-
contextLength: 1048576
|
|
33065
|
-
|
|
33066
|
-
{
|
|
33067
|
-
id: "xiaomi/mimo-v2.5-pro",
|
|
33068
|
-
name: "MiMo V2.5 Pro",
|
|
33069
|
-
description: "Xiaomi's latest pro MiMo model for agentic coding",
|
|
33070
|
-
category: "smart",
|
|
33071
|
-
provider: "openrouter",
|
|
33072
|
-
contextLength: 1048576
|
|
33064
|
+
contextLength: 1048576,
|
|
33065
|
+
cost: "free"
|
|
33073
33066
|
},
|
|
33074
33067
|
{
|
|
33075
33068
|
id: "deepseek/deepseek-v4-flash",
|
|
@@ -33077,15 +33070,8 @@ var OPENROUTER_MODELS = [
|
|
|
33077
33070
|
description: "DeepSeek's latest fast open-source model",
|
|
33078
33071
|
category: "fast",
|
|
33079
33072
|
provider: "openrouter",
|
|
33080
|
-
contextLength: 1048576
|
|
33081
|
-
|
|
33082
|
-
{
|
|
33083
|
-
id: "minimax/minimax-m3",
|
|
33084
|
-
name: "MiniMax M3",
|
|
33085
|
-
description: "MiniMax's latest open-weight multimodal model for agentic coding",
|
|
33086
|
-
category: "fast",
|
|
33087
|
-
provider: "openrouter",
|
|
33088
|
-
contextLength: 1048576
|
|
33073
|
+
contextLength: 1048576,
|
|
33074
|
+
cost: "lower-cost"
|
|
33089
33075
|
},
|
|
33090
33076
|
{
|
|
33091
33077
|
id: "z-ai/glm-5-turbo",
|
|
@@ -33093,39 +33079,8 @@ var OPENROUTER_MODELS = [
|
|
|
33093
33079
|
description: "Z.ai's latest fast GLM model",
|
|
33094
33080
|
category: "fast",
|
|
33095
33081
|
provider: "openrouter",
|
|
33096
|
-
contextLength: 202752
|
|
33097
|
-
|
|
33098
|
-
{
|
|
33099
|
-
id: "openai/gpt-latest",
|
|
33100
|
-
name: "OpenAI GPT Latest",
|
|
33101
|
-
description: "OpenRouter alias that redirects to the latest OpenAI GPT model",
|
|
33102
|
-
category: "smart",
|
|
33103
|
-
provider: "openrouter",
|
|
33104
|
-
contextLength: 1050000
|
|
33105
|
-
},
|
|
33106
|
-
{
|
|
33107
|
-
id: "openai/gpt-5.5",
|
|
33108
|
-
name: "GPT 5.5",
|
|
33109
|
-
description: "OpenAI's latest flagship GPT model",
|
|
33110
|
-
category: "smart",
|
|
33111
|
-
provider: "openrouter",
|
|
33112
|
-
contextLength: 1050000
|
|
33113
|
-
},
|
|
33114
|
-
{
|
|
33115
|
-
id: "anthropic/claude-sonnet-latest",
|
|
33116
|
-
name: "Claude Sonnet Latest",
|
|
33117
|
-
description: "OpenRouter alias that redirects to the latest Claude Sonnet model",
|
|
33118
|
-
category: "smart",
|
|
33119
|
-
provider: "openrouter",
|
|
33120
|
-
contextLength: 1e6
|
|
33121
|
-
},
|
|
33122
|
-
{
|
|
33123
|
-
id: "anthropic/claude-sonnet-4.6",
|
|
33124
|
-
name: "Claude Sonnet 4.6",
|
|
33125
|
-
description: "Anthropic's latest Sonnet model",
|
|
33126
|
-
category: "smart",
|
|
33127
|
-
provider: "openrouter",
|
|
33128
|
-
contextLength: 1e6
|
|
33082
|
+
contextLength: 202752,
|
|
33083
|
+
cost: "lower-cost"
|
|
33129
33084
|
},
|
|
33130
33085
|
{
|
|
33131
33086
|
id: "moonshotai/kimi-k2.7-code",
|
|
@@ -33133,23 +33088,8 @@ var OPENROUTER_MODELS = [
|
|
|
33133
33088
|
description: "Moonshot's latest open-weight coding model",
|
|
33134
33089
|
category: "smart",
|
|
33135
33090
|
provider: "openrouter",
|
|
33136
|
-
contextLength: 262144
|
|
33137
|
-
|
|
33138
|
-
{
|
|
33139
|
-
id: "moonshotai/kimi-k2.6",
|
|
33140
|
-
name: "Kimi K2.6",
|
|
33141
|
-
description: "Moonshot's latest Kimi model for coding agents",
|
|
33142
|
-
category: "smart",
|
|
33143
|
-
provider: "openrouter",
|
|
33144
|
-
contextLength: 262142
|
|
33145
|
-
},
|
|
33146
|
-
{
|
|
33147
|
-
id: "z-ai/glm-5.2",
|
|
33148
|
-
name: "GLM 5.2",
|
|
33149
|
-
description: "Z.ai's latest open-weight long-context GLM model",
|
|
33150
|
-
category: "smart",
|
|
33151
|
-
provider: "openrouter",
|
|
33152
|
-
contextLength: 1048576
|
|
33091
|
+
contextLength: 262144,
|
|
33092
|
+
cost: "lower-cost"
|
|
33153
33093
|
},
|
|
33154
33094
|
{
|
|
33155
33095
|
id: "deepseek/deepseek-v4-pro",
|
|
@@ -33157,39 +33097,26 @@ var OPENROUTER_MODELS = [
|
|
|
33157
33097
|
description: "DeepSeek's latest high-context open-source model",
|
|
33158
33098
|
category: "smart",
|
|
33159
33099
|
provider: "openrouter",
|
|
33160
|
-
contextLength: 1048576
|
|
33161
|
-
|
|
33162
|
-
{
|
|
33163
|
-
id: "z-ai/glm-5.1",
|
|
33164
|
-
name: "GLM 5.1",
|
|
33165
|
-
description: "Z.ai's latest GLM model",
|
|
33166
|
-
category: "smart",
|
|
33167
|
-
provider: "openrouter",
|
|
33168
|
-
contextLength: 202752
|
|
33100
|
+
contextLength: 1048576,
|
|
33101
|
+
cost: "lower-cost"
|
|
33169
33102
|
},
|
|
33170
33103
|
{
|
|
33171
|
-
id: "
|
|
33172
|
-
name: "
|
|
33173
|
-
description: "
|
|
33104
|
+
id: "anthropic/claude-sonnet-4.6",
|
|
33105
|
+
name: "Claude Sonnet 4.6",
|
|
33106
|
+
description: "Anthropic's latest Sonnet model",
|
|
33174
33107
|
category: "smart",
|
|
33175
33108
|
provider: "openrouter",
|
|
33176
|
-
contextLength: 1e6
|
|
33109
|
+
contextLength: 1e6,
|
|
33110
|
+
cost: "premium"
|
|
33177
33111
|
},
|
|
33178
33112
|
{
|
|
33179
|
-
id: "
|
|
33180
|
-
name: "
|
|
33181
|
-
description: "
|
|
33113
|
+
id: "openai/gpt-5.5",
|
|
33114
|
+
name: "GPT 5.5",
|
|
33115
|
+
description: "OpenAI's latest flagship GPT model",
|
|
33182
33116
|
category: "smart",
|
|
33183
33117
|
provider: "openrouter",
|
|
33184
|
-
contextLength:
|
|
33185
|
-
|
|
33186
|
-
{
|
|
33187
|
-
id: "anthropic/claude-opus-latest",
|
|
33188
|
-
name: "Claude Opus Latest",
|
|
33189
|
-
description: "OpenRouter alias that redirects to the latest Claude Opus model",
|
|
33190
|
-
category: "reasoning",
|
|
33191
|
-
provider: "openrouter",
|
|
33192
|
-
contextLength: 1e6
|
|
33118
|
+
contextLength: 1050000,
|
|
33119
|
+
cost: "premium"
|
|
33193
33120
|
},
|
|
33194
33121
|
{
|
|
33195
33122
|
id: "anthropic/claude-opus-4.8",
|
|
@@ -33197,41 +33124,19 @@ var OPENROUTER_MODELS = [
|
|
|
33197
33124
|
description: "Anthropic's latest Opus model",
|
|
33198
33125
|
category: "reasoning",
|
|
33199
33126
|
provider: "openrouter",
|
|
33200
|
-
contextLength: 1e6
|
|
33201
|
-
|
|
33202
|
-
{
|
|
33203
|
-
id: "openai/gpt-5.5-pro",
|
|
33204
|
-
name: "GPT 5.5 Pro",
|
|
33205
|
-
description: "OpenAI's latest high-capability reasoning model",
|
|
33206
|
-
category: "reasoning",
|
|
33207
|
-
provider: "openrouter",
|
|
33208
|
-
contextLength: 1050000
|
|
33209
|
-
},
|
|
33210
|
-
{
|
|
33211
|
-
id: "qwen/qwen3.7-max",
|
|
33212
|
-
name: "Qwen3.7 Max",
|
|
33213
|
-
description: "Qwen's latest high-capability open-weight model",
|
|
33214
|
-
category: "reasoning",
|
|
33215
|
-
provider: "openrouter",
|
|
33216
|
-
contextLength: 1e6
|
|
33127
|
+
contextLength: 1e6,
|
|
33128
|
+
cost: "premium"
|
|
33217
33129
|
}
|
|
33218
33130
|
];
|
|
33219
33131
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
33220
|
-
{
|
|
33221
|
-
id: "openai/gpt-latest",
|
|
33222
|
-
name: "OpenAI GPT Latest",
|
|
33223
|
-
description: "Vercel AI Gateway alias that redirects to the latest OpenAI GPT model",
|
|
33224
|
-
category: "smart",
|
|
33225
|
-
provider: "vercel-ai-gateway",
|
|
33226
|
-
contextLength: 1050000
|
|
33227
|
-
},
|
|
33228
33132
|
{
|
|
33229
33133
|
id: "openai/gpt-5.5",
|
|
33230
33134
|
name: "GPT 5.5",
|
|
33231
33135
|
description: "OpenAI's latest flagship GPT model",
|
|
33232
33136
|
category: "smart",
|
|
33233
33137
|
provider: "vercel-ai-gateway",
|
|
33234
|
-
contextLength: 1050000
|
|
33138
|
+
contextLength: 1050000,
|
|
33139
|
+
cost: "premium"
|
|
33235
33140
|
},
|
|
33236
33141
|
{
|
|
33237
33142
|
id: "anthropic/claude-sonnet-4.6",
|
|
@@ -33239,7 +33144,8 @@ var VERCEL_AI_GATEWAY_MODELS = [
|
|
|
33239
33144
|
description: "Anthropic's latest Sonnet model",
|
|
33240
33145
|
category: "smart",
|
|
33241
33146
|
provider: "vercel-ai-gateway",
|
|
33242
|
-
contextLength: 1e6
|
|
33147
|
+
contextLength: 1e6,
|
|
33148
|
+
cost: "premium"
|
|
33243
33149
|
},
|
|
33244
33150
|
{
|
|
33245
33151
|
id: "anthropic/claude-opus-4.8",
|
|
@@ -33247,25 +33153,28 @@ var VERCEL_AI_GATEWAY_MODELS = [
|
|
|
33247
33153
|
description: "Anthropic's latest Opus model",
|
|
33248
33154
|
category: "reasoning",
|
|
33249
33155
|
provider: "vercel-ai-gateway",
|
|
33250
|
-
contextLength: 1e6
|
|
33251
|
-
|
|
33252
|
-
{
|
|
33253
|
-
id: "openai/gpt-5.5-pro",
|
|
33254
|
-
name: "GPT 5.5 Pro",
|
|
33255
|
-
description: "OpenAI's latest high-capability reasoning model",
|
|
33256
|
-
category: "reasoning",
|
|
33257
|
-
provider: "vercel-ai-gateway",
|
|
33258
|
-
contextLength: 1050000
|
|
33156
|
+
contextLength: 1e6,
|
|
33157
|
+
cost: "premium"
|
|
33259
33158
|
}
|
|
33260
33159
|
];
|
|
33261
33160
|
var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
33161
|
+
{
|
|
33162
|
+
id: "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
|
33163
|
+
name: "Workers AI Llama 3.3 70B Fast",
|
|
33164
|
+
description: "Cloudflare Workers AI fast Llama model routed through AI Gateway",
|
|
33165
|
+
category: "smart",
|
|
33166
|
+
provider: "cloudflare-ai-gateway",
|
|
33167
|
+
contextLength: 24000,
|
|
33168
|
+
cost: "lower-cost"
|
|
33169
|
+
},
|
|
33262
33170
|
{
|
|
33263
33171
|
id: "openai/gpt-5.5",
|
|
33264
33172
|
name: "GPT 5.5",
|
|
33265
33173
|
description: "OpenAI's latest flagship GPT model through Cloudflare AI Gateway",
|
|
33266
33174
|
category: "smart",
|
|
33267
33175
|
provider: "cloudflare-ai-gateway",
|
|
33268
|
-
contextLength: 1050000
|
|
33176
|
+
contextLength: 1050000,
|
|
33177
|
+
cost: "premium"
|
|
33269
33178
|
},
|
|
33270
33179
|
{
|
|
33271
33180
|
id: "anthropic/claude-sonnet-4-6",
|
|
@@ -33273,7 +33182,8 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
33273
33182
|
description: "Anthropic's latest Sonnet model through Cloudflare AI Gateway",
|
|
33274
33183
|
category: "smart",
|
|
33275
33184
|
provider: "cloudflare-ai-gateway",
|
|
33276
|
-
contextLength: 1e6
|
|
33185
|
+
contextLength: 1e6,
|
|
33186
|
+
cost: "premium"
|
|
33277
33187
|
},
|
|
33278
33188
|
{
|
|
33279
33189
|
id: "anthropic/claude-opus-4-8",
|
|
@@ -33281,33 +33191,28 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
33281
33191
|
description: "Anthropic's latest Opus model through Cloudflare AI Gateway",
|
|
33282
33192
|
category: "reasoning",
|
|
33283
33193
|
provider: "cloudflare-ai-gateway",
|
|
33284
|
-
contextLength: 1e6
|
|
33285
|
-
|
|
33286
|
-
{
|
|
33287
|
-
id: "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
|
33288
|
-
name: "Workers AI Llama 3.3 70B Fast",
|
|
33289
|
-
description: "Cloudflare Workers AI fast Llama model routed through AI Gateway",
|
|
33290
|
-
category: "smart",
|
|
33291
|
-
provider: "cloudflare-ai-gateway",
|
|
33292
|
-
contextLength: 24000
|
|
33194
|
+
contextLength: 1e6,
|
|
33195
|
+
cost: "premium"
|
|
33293
33196
|
}
|
|
33294
33197
|
];
|
|
33295
33198
|
var WORKERS_AI_MODELS = [
|
|
33296
|
-
{
|
|
33297
|
-
id: "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
|
33298
|
-
name: "Llama 3.3 70B Fast",
|
|
33299
|
-
description: "Cloudflare Workers AI fast Llama instruct model",
|
|
33300
|
-
category: "smart",
|
|
33301
|
-
provider: "workers-ai",
|
|
33302
|
-
contextLength: 24000
|
|
33303
|
-
},
|
|
33304
33199
|
{
|
|
33305
33200
|
id: "@cf/meta/llama-3.1-8b-instruct",
|
|
33306
33201
|
name: "Llama 3.1 8B Instruct",
|
|
33307
33202
|
description: "Cloudflare Workers AI lightweight Llama instruct model",
|
|
33308
33203
|
category: "fast",
|
|
33309
33204
|
provider: "workers-ai",
|
|
33310
|
-
contextLength: 8000
|
|
33205
|
+
contextLength: 8000,
|
|
33206
|
+
cost: "lower-cost"
|
|
33207
|
+
},
|
|
33208
|
+
{
|
|
33209
|
+
id: "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
|
|
33210
|
+
name: "Llama 3.3 70B Fast",
|
|
33211
|
+
description: "Cloudflare Workers AI fast Llama instruct model",
|
|
33212
|
+
category: "smart",
|
|
33213
|
+
provider: "workers-ai",
|
|
33214
|
+
contextLength: 24000,
|
|
33215
|
+
cost: "lower-cost"
|
|
33311
33216
|
},
|
|
33312
33217
|
{
|
|
33313
33218
|
id: "@cf/openai/gpt-oss-120b",
|
|
@@ -33315,7 +33220,8 @@ var WORKERS_AI_MODELS = [
|
|
|
33315
33220
|
description: "OpenAI open-weight model hosted by Cloudflare Workers AI",
|
|
33316
33221
|
category: "reasoning",
|
|
33317
33222
|
provider: "workers-ai",
|
|
33318
|
-
contextLength: 32000
|
|
33223
|
+
contextLength: 32000,
|
|
33224
|
+
cost: "lower-cost"
|
|
33319
33225
|
}
|
|
33320
33226
|
];
|
|
33321
33227
|
var OPENCODE_ZEN_MODELS = [
|
|
@@ -33327,57 +33233,17 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33327
33233
|
provider: "opencode-zen",
|
|
33328
33234
|
zenApiType: "openai-compatible",
|
|
33329
33235
|
contextLength: 1048576,
|
|
33330
|
-
|
|
33331
|
-
},
|
|
33332
|
-
{
|
|
33333
|
-
id: "mimo-v2.5-free",
|
|
33334
|
-
name: "MiMo V2.5 Free",
|
|
33335
|
-
description: "Xiaomi's free long-context MiMo model (limited time)",
|
|
33336
|
-
category: "fast",
|
|
33337
|
-
provider: "opencode-zen",
|
|
33338
|
-
zenApiType: "openai-compatible",
|
|
33339
|
-
contextLength: 1048576,
|
|
33340
|
-
free: true
|
|
33341
|
-
},
|
|
33342
|
-
{
|
|
33343
|
-
id: "north-mini-code-free",
|
|
33344
|
-
name: "North Mini Code Free",
|
|
33345
|
-
description: "North's free coding model (limited time)",
|
|
33346
|
-
category: "fast",
|
|
33347
|
-
provider: "opencode-zen",
|
|
33348
|
-
zenApiType: "openai-compatible",
|
|
33349
|
-
contextLength: 200000,
|
|
33350
|
-
free: true
|
|
33351
|
-
},
|
|
33352
|
-
{
|
|
33353
|
-
id: "nemotron-3-ultra-free",
|
|
33354
|
-
name: "Nemotron 3 Ultra Free",
|
|
33355
|
-
description: "NVIDIA Nemotron free trial model (limited time)",
|
|
33356
|
-
category: "smart",
|
|
33357
|
-
provider: "opencode-zen",
|
|
33358
|
-
zenApiType: "openai-compatible",
|
|
33359
|
-
contextLength: 131072,
|
|
33360
|
-
free: true
|
|
33361
|
-
},
|
|
33362
|
-
{
|
|
33363
|
-
id: "big-pickle",
|
|
33364
|
-
name: "Big Pickle",
|
|
33365
|
-
description: "OpenCode stealth model (free, limited time)",
|
|
33366
|
-
category: "smart",
|
|
33367
|
-
provider: "opencode-zen",
|
|
33368
|
-
zenApiType: "openai-compatible",
|
|
33369
|
-
contextLength: 131072,
|
|
33370
|
-
free: true
|
|
33236
|
+
cost: "free"
|
|
33371
33237
|
},
|
|
33372
33238
|
{
|
|
33373
33239
|
id: "gpt-5-nano",
|
|
33374
33240
|
name: "GPT 5 Nano",
|
|
33375
|
-
description: "OpenAI's
|
|
33241
|
+
description: "OpenAI's lightweight GPT model ($0.05/$0.40 per 1M tokens)",
|
|
33376
33242
|
category: "fast",
|
|
33377
33243
|
provider: "opencode-zen",
|
|
33378
33244
|
zenApiType: "openai-responses",
|
|
33379
33245
|
contextLength: 400000,
|
|
33380
|
-
|
|
33246
|
+
cost: "lower-cost"
|
|
33381
33247
|
},
|
|
33382
33248
|
{
|
|
33383
33249
|
id: "claude-haiku-4-5",
|
|
@@ -33386,7 +33252,8 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33386
33252
|
category: "fast",
|
|
33387
33253
|
provider: "opencode-zen",
|
|
33388
33254
|
zenApiType: "anthropic",
|
|
33389
|
-
contextLength: 200000
|
|
33255
|
+
contextLength: 200000,
|
|
33256
|
+
cost: "lower-cost"
|
|
33390
33257
|
},
|
|
33391
33258
|
{
|
|
33392
33259
|
id: "gemini-3.5-flash",
|
|
@@ -33395,52 +33262,8 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33395
33262
|
category: "fast",
|
|
33396
33263
|
provider: "opencode-zen",
|
|
33397
33264
|
zenApiType: "google",
|
|
33398
|
-
contextLength: 1048576
|
|
33399
|
-
|
|
33400
|
-
{
|
|
33401
|
-
id: "gemini-3-flash",
|
|
33402
|
-
name: "Gemini 3 Flash",
|
|
33403
|
-
description: "Google's fast Gemini model",
|
|
33404
|
-
category: "fast",
|
|
33405
|
-
provider: "opencode-zen",
|
|
33406
|
-
zenApiType: "google",
|
|
33407
|
-
contextLength: 200000
|
|
33408
|
-
},
|
|
33409
|
-
{
|
|
33410
|
-
id: "mimo-v2.5",
|
|
33411
|
-
name: "MiMo V2.5",
|
|
33412
|
-
description: "Xiaomi's latest long-context MiMo model",
|
|
33413
|
-
category: "fast",
|
|
33414
|
-
provider: "opencode-zen",
|
|
33415
|
-
zenApiType: "openai-compatible",
|
|
33416
|
-
contextLength: 1048576
|
|
33417
|
-
},
|
|
33418
|
-
{
|
|
33419
|
-
id: "gpt-5.4-mini",
|
|
33420
|
-
name: "GPT 5.4 Mini",
|
|
33421
|
-
description: "OpenAI's latest fast GPT mini model",
|
|
33422
|
-
category: "fast",
|
|
33423
|
-
provider: "opencode-zen",
|
|
33424
|
-
zenApiType: "openai-responses",
|
|
33425
|
-
contextLength: 400000
|
|
33426
|
-
},
|
|
33427
|
-
{
|
|
33428
|
-
id: "gpt-5.4-nano",
|
|
33429
|
-
name: "GPT 5.4 Nano",
|
|
33430
|
-
description: "OpenAI's latest lightweight GPT model",
|
|
33431
|
-
category: "fast",
|
|
33432
|
-
provider: "opencode-zen",
|
|
33433
|
-
zenApiType: "openai-responses",
|
|
33434
|
-
contextLength: 400000
|
|
33435
|
-
},
|
|
33436
|
-
{
|
|
33437
|
-
id: "claude-fable-5",
|
|
33438
|
-
name: "Claude Fable 5",
|
|
33439
|
-
description: "Anthropic's latest Fable model",
|
|
33440
|
-
category: "smart",
|
|
33441
|
-
provider: "opencode-zen",
|
|
33442
|
-
zenApiType: "anthropic",
|
|
33443
|
-
contextLength: 1e6
|
|
33265
|
+
contextLength: 1048576,
|
|
33266
|
+
cost: "lower-cost"
|
|
33444
33267
|
},
|
|
33445
33268
|
{
|
|
33446
33269
|
id: "claude-sonnet-4-6",
|
|
@@ -33449,16 +33272,8 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33449
33272
|
category: "smart",
|
|
33450
33273
|
provider: "opencode-zen",
|
|
33451
33274
|
zenApiType: "anthropic",
|
|
33452
|
-
contextLength: 1e6
|
|
33453
|
-
|
|
33454
|
-
{
|
|
33455
|
-
id: "gemini-3.1-pro",
|
|
33456
|
-
name: "Gemini 3.1 Pro",
|
|
33457
|
-
description: "Google's high-end Gemini model",
|
|
33458
|
-
category: "smart",
|
|
33459
|
-
provider: "opencode-zen",
|
|
33460
|
-
zenApiType: "google",
|
|
33461
|
-
contextLength: 200000
|
|
33275
|
+
contextLength: 1e6,
|
|
33276
|
+
cost: "premium"
|
|
33462
33277
|
},
|
|
33463
33278
|
{
|
|
33464
33279
|
id: "gpt-5.5",
|
|
@@ -33467,115 +33282,8 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33467
33282
|
category: "smart",
|
|
33468
33283
|
provider: "opencode-zen",
|
|
33469
33284
|
zenApiType: "openai-responses",
|
|
33470
|
-
contextLength: 1050000
|
|
33471
|
-
|
|
33472
|
-
{
|
|
33473
|
-
id: "gpt-5.5-pro",
|
|
33474
|
-
name: "GPT 5.5 Pro",
|
|
33475
|
-
description: "OpenAI's latest high-capability reasoning model",
|
|
33476
|
-
category: "smart",
|
|
33477
|
-
provider: "opencode-zen",
|
|
33478
|
-
zenApiType: "openai-responses",
|
|
33479
|
-
contextLength: 1050000
|
|
33480
|
-
},
|
|
33481
|
-
{
|
|
33482
|
-
id: "gpt-5.3-codex",
|
|
33483
|
-
name: "GPT 5.3 Codex",
|
|
33484
|
-
description: "OpenAI's latest coding-focused GPT model",
|
|
33485
|
-
category: "smart",
|
|
33486
|
-
provider: "opencode-zen",
|
|
33487
|
-
zenApiType: "openai-responses",
|
|
33488
|
-
contextLength: 400000
|
|
33489
|
-
},
|
|
33490
|
-
{
|
|
33491
|
-
id: "gpt-5.3-codex-spark",
|
|
33492
|
-
name: "GPT 5.3 Codex Spark",
|
|
33493
|
-
description: "OpenAI's latest fast coding-focused GPT model",
|
|
33494
|
-
category: "smart",
|
|
33495
|
-
provider: "opencode-zen",
|
|
33496
|
-
zenApiType: "openai-responses",
|
|
33497
|
-
contextLength: 400000
|
|
33498
|
-
},
|
|
33499
|
-
{
|
|
33500
|
-
id: "qwen3.7-plus",
|
|
33501
|
-
name: "Qwen3.7 Plus",
|
|
33502
|
-
description: "Qwen's latest long-context open-weight plus model",
|
|
33503
|
-
category: "smart",
|
|
33504
|
-
provider: "opencode-zen",
|
|
33505
|
-
zenApiType: "anthropic",
|
|
33506
|
-
contextLength: 1e6
|
|
33507
|
-
},
|
|
33508
|
-
{
|
|
33509
|
-
id: "qwen3.7-max",
|
|
33510
|
-
name: "Qwen3.7 Max",
|
|
33511
|
-
description: "Qwen's latest high-capability open-weight model",
|
|
33512
|
-
category: "smart",
|
|
33513
|
-
provider: "opencode-zen",
|
|
33514
|
-
zenApiType: "anthropic",
|
|
33515
|
-
contextLength: 1e6
|
|
33516
|
-
},
|
|
33517
|
-
{
|
|
33518
|
-
id: "minimax-m2.7",
|
|
33519
|
-
name: "MiniMax M2.7",
|
|
33520
|
-
description: "MiniMax's latest model",
|
|
33521
|
-
category: "smart",
|
|
33522
|
-
provider: "opencode-zen",
|
|
33523
|
-
zenApiType: "openai-compatible",
|
|
33524
|
-
contextLength: 196608
|
|
33525
|
-
},
|
|
33526
|
-
{
|
|
33527
|
-
id: "kimi-k2.6",
|
|
33528
|
-
name: "Kimi K2.6",
|
|
33529
|
-
description: "Moonshot's latest model",
|
|
33530
|
-
category: "smart",
|
|
33531
|
-
provider: "opencode-zen",
|
|
33532
|
-
zenApiType: "openai-compatible",
|
|
33533
|
-
contextLength: 262144
|
|
33534
|
-
},
|
|
33535
|
-
{
|
|
33536
|
-
id: "glm-5.2",
|
|
33537
|
-
name: "GLM 5.2",
|
|
33538
|
-
description: "Z.ai's latest open-weight long-context GLM model",
|
|
33539
|
-
category: "smart",
|
|
33540
|
-
provider: "opencode-zen",
|
|
33541
|
-
zenApiType: "openai-compatible",
|
|
33542
|
-
contextLength: 1048576
|
|
33543
|
-
},
|
|
33544
|
-
{
|
|
33545
|
-
id: "deepseek-v4-pro",
|
|
33546
|
-
name: "DeepSeek V4 Pro",
|
|
33547
|
-
description: "DeepSeek's latest high-context open-source model",
|
|
33548
|
-
category: "smart",
|
|
33549
|
-
provider: "opencode-zen",
|
|
33550
|
-
zenApiType: "openai-compatible",
|
|
33551
|
-
contextLength: 1048576
|
|
33552
|
-
},
|
|
33553
|
-
{
|
|
33554
|
-
id: "mimo-v2.5-pro",
|
|
33555
|
-
name: "MiMo V2.5 Pro",
|
|
33556
|
-
description: "Xiaomi's latest pro MiMo model for agentic coding",
|
|
33557
|
-
category: "smart",
|
|
33558
|
-
provider: "opencode-zen",
|
|
33559
|
-
zenApiType: "openai-compatible",
|
|
33560
|
-
contextLength: 1048576
|
|
33561
|
-
},
|
|
33562
|
-
{
|
|
33563
|
-
id: "glm-5.1",
|
|
33564
|
-
name: "GLM 5.1",
|
|
33565
|
-
description: "Z.ai's latest GLM model",
|
|
33566
|
-
category: "smart",
|
|
33567
|
-
provider: "opencode-zen",
|
|
33568
|
-
zenApiType: "openai-compatible",
|
|
33569
|
-
contextLength: 202752
|
|
33570
|
-
},
|
|
33571
|
-
{
|
|
33572
|
-
id: "deepseek-v4-flash",
|
|
33573
|
-
name: "DeepSeek V4 Flash",
|
|
33574
|
-
description: "DeepSeek's latest fast open-source model",
|
|
33575
|
-
category: "fast",
|
|
33576
|
-
provider: "opencode-zen",
|
|
33577
|
-
zenApiType: "openai-compatible",
|
|
33578
|
-
contextLength: 1048576
|
|
33285
|
+
contextLength: 1050000,
|
|
33286
|
+
cost: "premium"
|
|
33579
33287
|
},
|
|
33580
33288
|
{
|
|
33581
33289
|
id: "claude-opus-4-8",
|
|
@@ -33584,7 +33292,8 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33584
33292
|
category: "reasoning",
|
|
33585
33293
|
provider: "opencode-zen",
|
|
33586
33294
|
zenApiType: "anthropic",
|
|
33587
|
-
contextLength: 1e6
|
|
33295
|
+
contextLength: 1e6,
|
|
33296
|
+
cost: "premium"
|
|
33588
33297
|
}
|
|
33589
33298
|
];
|
|
33590
33299
|
var ALL_MODELS = [
|
|
@@ -33634,6 +33343,27 @@ function getProviderDisplayName(provider) {
|
|
|
33634
33343
|
}
|
|
33635
33344
|
}
|
|
33636
33345
|
}
|
|
33346
|
+
var COST_TIER_ORDER = {
|
|
33347
|
+
free: 0,
|
|
33348
|
+
"lower-cost": 1,
|
|
33349
|
+
premium: 2
|
|
33350
|
+
};
|
|
33351
|
+
var CATEGORY_ORDER = {
|
|
33352
|
+
fast: 0,
|
|
33353
|
+
smart: 1,
|
|
33354
|
+
reasoning: 2
|
|
33355
|
+
};
|
|
33356
|
+
function sortModelsByCost(models) {
|
|
33357
|
+
return [...models].sort((a, b2) => {
|
|
33358
|
+
const costDiff = COST_TIER_ORDER[a.cost] - COST_TIER_ORDER[b2.cost];
|
|
33359
|
+
if (costDiff !== 0)
|
|
33360
|
+
return costDiff;
|
|
33361
|
+
const catDiff = CATEGORY_ORDER[a.category] - CATEGORY_ORDER[b2.category];
|
|
33362
|
+
if (catDiff !== 0)
|
|
33363
|
+
return catDiff;
|
|
33364
|
+
return a.name.localeCompare(b2.name);
|
|
33365
|
+
});
|
|
33366
|
+
}
|
|
33637
33367
|
|
|
33638
33368
|
// src/lib/types.ts
|
|
33639
33369
|
function isCustomModel(model) {
|
|
@@ -77093,7 +76823,17 @@ function generateMessageId() {
|
|
|
77093
76823
|
return `msg-${++messageIdCounter}`;
|
|
77094
76824
|
}
|
|
77095
76825
|
function isFreeModel(model) {
|
|
77096
|
-
return !isCustomModel(model) &&
|
|
76826
|
+
return !isCustomModel(model) && model.cost === "free";
|
|
76827
|
+
}
|
|
76828
|
+
function costTierLabel(tier) {
|
|
76829
|
+
switch (tier) {
|
|
76830
|
+
case "free":
|
|
76831
|
+
return "FREE";
|
|
76832
|
+
case "lower-cost":
|
|
76833
|
+
return "lower-cost";
|
|
76834
|
+
case "premium":
|
|
76835
|
+
return "premium";
|
|
76836
|
+
}
|
|
77097
76837
|
}
|
|
77098
76838
|
async function main() {
|
|
77099
76839
|
config2 = loadConfig();
|
|
@@ -78057,16 +77797,17 @@ function showModelSelector() {
|
|
|
78057
77797
|
});
|
|
78058
77798
|
renderer.root.add(container);
|
|
78059
77799
|
const allModels = getProviderModels(config2.provider);
|
|
78060
|
-
const availableModels = allModels.filter((m2) => !m2.disabled)
|
|
77800
|
+
const availableModels = allModels.filter((m2) => !m2.disabled);
|
|
77801
|
+
const sortedModels = sortModelsByCost(availableModels);
|
|
78061
77802
|
const customModels = getCustomModels().sort((a, b2) => a.name.localeCompare(b2.name));
|
|
78062
77803
|
const options = [
|
|
78063
|
-
...
|
|
78064
|
-
name: `${model.name} [${model.
|
|
77804
|
+
...sortedModels.map((model) => ({
|
|
77805
|
+
name: `${model.name} [${costTierLabel(model.cost)}]`,
|
|
78065
77806
|
description: model.description,
|
|
78066
77807
|
value: model
|
|
78067
77808
|
})),
|
|
78068
77809
|
...customModels.map((model) => ({
|
|
78069
|
-
name: `${model.name} [
|
|
77810
|
+
name: `${model.name} [custom]`,
|
|
78070
77811
|
description: `${model.baseUrl} - ${model.modelId}`,
|
|
78071
77812
|
value: model
|
|
78072
77813
|
}))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@austinthesing/magic-shell",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "Natural language to terminal commands with safety features. Supports OpenCode Zen, OpenRouter, AI gateways, Workers AI, and custom models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|