@austinthesing/magic-shell 1.1.3 → 1.1.5
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 +161 -18
- package/dist/index.js +162 -24
- package/dist/tui.js +161 -18
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33059,6 +33059,33 @@ import { cwd as getCwd } from "process";
|
|
|
33059
33059
|
|
|
33060
33060
|
// src/lib/models.ts
|
|
33061
33061
|
var OPENROUTER_MODELS = [
|
|
33062
|
+
{
|
|
33063
|
+
id: "openai/gpt-6-astra",
|
|
33064
|
+
name: "GPT 6 Astra",
|
|
33065
|
+
description: "OpenAI's flagship model for complex reasoning and coding.",
|
|
33066
|
+
category: "reasoning",
|
|
33067
|
+
provider: "openrouter",
|
|
33068
|
+
contextLength: 1050000,
|
|
33069
|
+
cost: "premium"
|
|
33070
|
+
},
|
|
33071
|
+
{
|
|
33072
|
+
id: "deepseek/deepseek-v4.1-flash",
|
|
33073
|
+
name: "DeepSeek V4.1 Flash",
|
|
33074
|
+
description: "Efficient open-weight model for coding and reasoning with native vision.",
|
|
33075
|
+
category: "fast",
|
|
33076
|
+
provider: "openrouter",
|
|
33077
|
+
contextLength: 1048576,
|
|
33078
|
+
cost: "lower-cost"
|
|
33079
|
+
},
|
|
33080
|
+
{
|
|
33081
|
+
id: "nex-agi/nex-n2.5-mini:free",
|
|
33082
|
+
name: "Nex N2.5 Mini (Free)",
|
|
33083
|
+
description: "Free open-weight model for agentic coding tasks.",
|
|
33084
|
+
category: "smart",
|
|
33085
|
+
provider: "openrouter",
|
|
33086
|
+
contextLength: 262144,
|
|
33087
|
+
cost: "free"
|
|
33088
|
+
},
|
|
33062
33089
|
{
|
|
33063
33090
|
id: "inclusionai/ling-3.0-tiny:free",
|
|
33064
33091
|
name: "Ling 3.0 Tiny (Free)",
|
|
@@ -33095,6 +33122,15 @@ var OPENROUTER_MODELS = [
|
|
|
33095
33122
|
contextLength: 1e6,
|
|
33096
33123
|
cost: "free"
|
|
33097
33124
|
},
|
|
33125
|
+
{
|
|
33126
|
+
id: "poolside/laguna-s-2.1:free",
|
|
33127
|
+
name: "Laguna S 2.1 (Free)",
|
|
33128
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
33129
|
+
category: "reasoning",
|
|
33130
|
+
provider: "openrouter",
|
|
33131
|
+
contextLength: 262144,
|
|
33132
|
+
cost: "free"
|
|
33133
|
+
},
|
|
33098
33134
|
{
|
|
33099
33135
|
id: "deepseek/deepseek-v4-flash-0731",
|
|
33100
33136
|
name: "DeepSeek V4 Flash 0731",
|
|
@@ -33131,6 +33167,15 @@ var OPENROUTER_MODELS = [
|
|
|
33131
33167
|
contextLength: 1048576,
|
|
33132
33168
|
cost: "lower-cost"
|
|
33133
33169
|
},
|
|
33170
|
+
{
|
|
33171
|
+
id: "z-ai/glm-5.3-flash",
|
|
33172
|
+
name: "GLM 5.3 Flash",
|
|
33173
|
+
description: "Open-weight multimodal GLM model optimized for efficient agentic coding.",
|
|
33174
|
+
category: "smart",
|
|
33175
|
+
provider: "openrouter",
|
|
33176
|
+
contextLength: 1310720,
|
|
33177
|
+
cost: "lower-cost"
|
|
33178
|
+
},
|
|
33134
33179
|
{
|
|
33135
33180
|
id: "qwen/qwen3.6-27b",
|
|
33136
33181
|
name: "Qwen 3.6 27B",
|
|
@@ -33212,6 +33257,15 @@ var OPENROUTER_MODELS = [
|
|
|
33212
33257
|
contextLength: 1e6,
|
|
33213
33258
|
cost: "premium"
|
|
33214
33259
|
},
|
|
33260
|
+
{
|
|
33261
|
+
id: "anthropic/claude-fable-5.1",
|
|
33262
|
+
name: "Claude Fable 5.1",
|
|
33263
|
+
description: "Anthropic's latest model for demanding reasoning and long-running agents.",
|
|
33264
|
+
category: "reasoning",
|
|
33265
|
+
provider: "openrouter",
|
|
33266
|
+
contextLength: 1e6,
|
|
33267
|
+
cost: "premium"
|
|
33268
|
+
},
|
|
33215
33269
|
{
|
|
33216
33270
|
id: "anthropic/claude-fable-5",
|
|
33217
33271
|
name: "Claude Fable 5",
|
|
@@ -33225,10 +33279,13 @@ var OPENROUTER_MODELS = [
|
|
|
33225
33279
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
33226
33280
|
...OPENROUTER_MODELS.filter((model) => [
|
|
33227
33281
|
"openai/gpt-5.6-luna",
|
|
33282
|
+
"openai/gpt-6-astra",
|
|
33283
|
+
"deepseek/deepseek-v4.1-flash",
|
|
33228
33284
|
"openai/gpt-5.6-terra",
|
|
33229
33285
|
"openai/gpt-5.6-sol",
|
|
33230
33286
|
"anthropic/claude-sonnet-5",
|
|
33231
33287
|
"anthropic/claude-opus-5",
|
|
33288
|
+
"anthropic/claude-fable-5.1",
|
|
33232
33289
|
"anthropic/claude-fable-5"
|
|
33233
33290
|
].includes(model.id)).map((model) => ({ ...model, provider: "vercel-ai-gateway" })),
|
|
33234
33291
|
{
|
|
@@ -33257,6 +33314,24 @@ var VERCEL_AI_GATEWAY_MODELS = [
|
|
|
33257
33314
|
provider: "vercel-ai-gateway",
|
|
33258
33315
|
contextLength: 1e6,
|
|
33259
33316
|
cost: "lower-cost"
|
|
33317
|
+
},
|
|
33318
|
+
{
|
|
33319
|
+
id: "zai/glm-5.3-flash",
|
|
33320
|
+
name: "GLM 5.3 Flash",
|
|
33321
|
+
description: "Open-weight multimodal GLM model optimized for efficient agentic coding.",
|
|
33322
|
+
category: "smart",
|
|
33323
|
+
provider: "vercel-ai-gateway",
|
|
33324
|
+
contextLength: 1e6,
|
|
33325
|
+
cost: "lower-cost"
|
|
33326
|
+
},
|
|
33327
|
+
{
|
|
33328
|
+
id: "poolside/laguna-s-2.1-free",
|
|
33329
|
+
name: "Laguna S 2.1 (Free)",
|
|
33330
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
33331
|
+
category: "reasoning",
|
|
33332
|
+
provider: "vercel-ai-gateway",
|
|
33333
|
+
contextLength: 256000,
|
|
33334
|
+
cost: "free"
|
|
33260
33335
|
}
|
|
33261
33336
|
];
|
|
33262
33337
|
var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
@@ -33269,13 +33344,31 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
33269
33344
|
contextLength: 32000,
|
|
33270
33345
|
cost: "lower-cost"
|
|
33271
33346
|
},
|
|
33272
|
-
...VERCEL_AI_GATEWAY_MODELS.map((model) => ({
|
|
33347
|
+
...VERCEL_AI_GATEWAY_MODELS.filter((model) => model.id !== "deepseek/deepseek-v4.1-flash").map((model) => ({
|
|
33273
33348
|
...model,
|
|
33274
33349
|
id: model.id.startsWith("anthropic/") ? model.id.replaceAll(".", "-") : model.id,
|
|
33275
33350
|
provider: "cloudflare-ai-gateway"
|
|
33276
33351
|
}))
|
|
33277
33352
|
];
|
|
33278
33353
|
var WORKERS_AI_MODELS = [
|
|
33354
|
+
{
|
|
33355
|
+
id: "@cf/zai-org/glm-5.3",
|
|
33356
|
+
name: "GLM 5.3",
|
|
33357
|
+
description: "Open-weight flagship model for long-running agentic coding workflows.",
|
|
33358
|
+
category: "reasoning",
|
|
33359
|
+
provider: "workers-ai",
|
|
33360
|
+
contextLength: 1048576,
|
|
33361
|
+
cost: "lower-cost"
|
|
33362
|
+
},
|
|
33363
|
+
{
|
|
33364
|
+
id: "@cf/zai-org/glm-5.3-flash",
|
|
33365
|
+
name: "GLM 5.3 Flash",
|
|
33366
|
+
description: "Open-weight multimodal model for efficient reasoning and agentic coding.",
|
|
33367
|
+
category: "smart",
|
|
33368
|
+
provider: "workers-ai",
|
|
33369
|
+
contextLength: 1310720,
|
|
33370
|
+
cost: "lower-cost"
|
|
33371
|
+
},
|
|
33279
33372
|
{
|
|
33280
33373
|
id: "@cf/zai-org/glm-5.2",
|
|
33281
33374
|
name: "GLM 5.2",
|
|
@@ -33285,6 +33378,33 @@ var WORKERS_AI_MODELS = [
|
|
|
33285
33378
|
contextLength: 262144,
|
|
33286
33379
|
cost: "lower-cost"
|
|
33287
33380
|
},
|
|
33381
|
+
{
|
|
33382
|
+
id: "@cf/deepseek-ai/deepseek-v4-flash-0731",
|
|
33383
|
+
name: "DeepSeek V4 Flash 0731",
|
|
33384
|
+
description: "Fast open-weight DeepSeek model with a one-million-token context window.",
|
|
33385
|
+
category: "fast",
|
|
33386
|
+
provider: "workers-ai",
|
|
33387
|
+
contextLength: 1048576,
|
|
33388
|
+
cost: "lower-cost"
|
|
33389
|
+
},
|
|
33390
|
+
{
|
|
33391
|
+
id: "@cf/deepseek-ai/deepseek-v4-pro-0813",
|
|
33392
|
+
name: "DeepSeek V4 Pro 0813",
|
|
33393
|
+
description: "Open-weight DeepSeek model for complex agentic work.",
|
|
33394
|
+
category: "reasoning",
|
|
33395
|
+
provider: "workers-ai",
|
|
33396
|
+
contextLength: 1048576,
|
|
33397
|
+
cost: "lower-cost"
|
|
33398
|
+
},
|
|
33399
|
+
{
|
|
33400
|
+
id: "@cf/qwen/qwen3.8-27b",
|
|
33401
|
+
name: "Qwen 3.8 27B",
|
|
33402
|
+
description: "Open-weight vision-language model with reasoning and function calling.",
|
|
33403
|
+
category: "smart",
|
|
33404
|
+
provider: "workers-ai",
|
|
33405
|
+
contextLength: 262144,
|
|
33406
|
+
cost: "lower-cost"
|
|
33407
|
+
},
|
|
33288
33408
|
{
|
|
33289
33409
|
id: "@cf/zai-org/glm-4.7-flash",
|
|
33290
33410
|
name: "GLM 4.7 Flash",
|
|
@@ -33362,6 +33482,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33362
33482
|
contextLength: 1e6,
|
|
33363
33483
|
cost: "free"
|
|
33364
33484
|
},
|
|
33485
|
+
{
|
|
33486
|
+
id: "laguna-s-2.1-free",
|
|
33487
|
+
name: "Laguna S 2.1 (Free)",
|
|
33488
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
33489
|
+
category: "reasoning",
|
|
33490
|
+
provider: "opencode-zen",
|
|
33491
|
+
zenApiType: "openai-compatible",
|
|
33492
|
+
contextLength: 262144,
|
|
33493
|
+
cost: "free"
|
|
33494
|
+
},
|
|
33365
33495
|
{
|
|
33366
33496
|
id: "minimax-m3",
|
|
33367
33497
|
name: "MiniMax M3",
|
|
@@ -33404,6 +33534,7 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33404
33534
|
},
|
|
33405
33535
|
...[
|
|
33406
33536
|
["gpt-5.6-luna", "GPT 5.6 Luna", "fast", "lower-cost"],
|
|
33537
|
+
["gpt-6-astra", "GPT 6 Astra", "reasoning", "premium"],
|
|
33407
33538
|
["gpt-5.6-terra", "GPT 5.6 Terra", "smart", "premium"],
|
|
33408
33539
|
["gpt-5.6-sol", "GPT 5.6 Sol", "reasoning", "premium"]
|
|
33409
33540
|
].map(([id, name, category, cost]) => ({
|
|
@@ -33436,6 +33567,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33436
33567
|
contextLength: 1e6,
|
|
33437
33568
|
cost: "premium"
|
|
33438
33569
|
},
|
|
33570
|
+
{
|
|
33571
|
+
id: "claude-fable-5-1",
|
|
33572
|
+
name: "Claude Fable 5.1",
|
|
33573
|
+
description: "Anthropic's latest model for demanding reasoning and long-running agents.",
|
|
33574
|
+
category: "reasoning",
|
|
33575
|
+
provider: "opencode-zen",
|
|
33576
|
+
zenApiType: "anthropic",
|
|
33577
|
+
contextLength: 1e6,
|
|
33578
|
+
cost: "premium"
|
|
33579
|
+
},
|
|
33439
33580
|
{
|
|
33440
33581
|
id: "claude-fable-5",
|
|
33441
33582
|
name: "Claude Fable 5",
|
|
@@ -33489,6 +33630,22 @@ function getProviderDisplayName(provider) {
|
|
|
33489
33630
|
return "Custom";
|
|
33490
33631
|
}
|
|
33491
33632
|
}
|
|
33633
|
+
function getApiKeyUrl(provider) {
|
|
33634
|
+
switch (provider) {
|
|
33635
|
+
case "opencode-zen":
|
|
33636
|
+
return "https://opencode.ai/auth";
|
|
33637
|
+
case "openrouter":
|
|
33638
|
+
return "https://openrouter.ai/keys";
|
|
33639
|
+
case "vercel-ai-gateway":
|
|
33640
|
+
return "https://vercel.com/docs/ai-gateway";
|
|
33641
|
+
case "cloudflare-ai-gateway":
|
|
33642
|
+
return "https://developers.cloudflare.com/ai-gateway/";
|
|
33643
|
+
case "workers-ai":
|
|
33644
|
+
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
33645
|
+
case "custom":
|
|
33646
|
+
return "";
|
|
33647
|
+
}
|
|
33648
|
+
}
|
|
33492
33649
|
var COST_TIER_ORDER = { free: 0, "lower-cost": 1, premium: 2 };
|
|
33493
33650
|
var CATEGORY_ORDER = { fast: 0, smart: 1, reasoning: 2 };
|
|
33494
33651
|
function sortModelsByCost(models) {
|
|
@@ -81169,7 +81326,7 @@ function getThinkingLevel(config2) {
|
|
|
81169
81326
|
return config2?.thinkingLevel || "low";
|
|
81170
81327
|
}
|
|
81171
81328
|
function supportsThinkingControl(modelId) {
|
|
81172
|
-
return modelId.includes("thinking") || modelId.includes("gpt-5") || modelId.includes("claude-") || modelId.includes("gemini-");
|
|
81329
|
+
return modelId.includes("thinking") || modelId.includes("gpt-5") || modelId.includes("gpt-6") || modelId.includes("claude-") || modelId.includes("gemini-");
|
|
81173
81330
|
}
|
|
81174
81331
|
function buildOpenRouterThinkingOptions(modelId, thinkingLevel) {
|
|
81175
81332
|
if (thinkingLevel === "off" || !supportsThinkingControl(modelId)) {
|
|
@@ -81248,6 +81405,8 @@ function buildAiSdkProviderOptions(modelId, thinkingLevel, providerOptionsName)
|
|
|
81248
81405
|
return;
|
|
81249
81406
|
}
|
|
81250
81407
|
function shouldOmitTemperature(modelId, thinkingLevel) {
|
|
81408
|
+
if (modelId.includes("gpt-6"))
|
|
81409
|
+
return true;
|
|
81251
81410
|
return thinkingLevel !== "off" && (modelId.startsWith("claude-") || modelId.includes("gpt-5"));
|
|
81252
81411
|
}
|
|
81253
81412
|
async function callOpenRouter(apiKey, modelId, systemPrompt, userInput, thinkingLevel) {
|
|
@@ -81940,22 +82099,6 @@ var statusBarText;
|
|
|
81940
82099
|
var chatScrollBox;
|
|
81941
82100
|
var inputField;
|
|
81942
82101
|
var inputContainer;
|
|
81943
|
-
function getApiKeyUrl(provider) {
|
|
81944
|
-
switch (provider) {
|
|
81945
|
-
case "opencode-zen":
|
|
81946
|
-
return "https://opencode.ai/auth";
|
|
81947
|
-
case "openrouter":
|
|
81948
|
-
return "https://openrouter.ai/keys";
|
|
81949
|
-
case "vercel-ai-gateway":
|
|
81950
|
-
return "https://vercel.com/docs/ai-gateway";
|
|
81951
|
-
case "cloudflare-ai-gateway":
|
|
81952
|
-
return "https://developers.cloudflare.com/ai-gateway/";
|
|
81953
|
-
case "workers-ai":
|
|
81954
|
-
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
81955
|
-
case "custom":
|
|
81956
|
-
return "";
|
|
81957
|
-
}
|
|
81958
|
-
}
|
|
81959
82102
|
var inputHintText;
|
|
81960
82103
|
var helpBarText;
|
|
81961
82104
|
var slashCommandMatches = [];
|
package/dist/index.js
CHANGED
|
@@ -717,6 +717,33 @@ import { cwd as getCwd } from "process";
|
|
|
717
717
|
|
|
718
718
|
// src/lib/models.ts
|
|
719
719
|
var OPENROUTER_MODELS = [
|
|
720
|
+
{
|
|
721
|
+
id: "openai/gpt-6-astra",
|
|
722
|
+
name: "GPT 6 Astra",
|
|
723
|
+
description: "OpenAI's flagship model for complex reasoning and coding.",
|
|
724
|
+
category: "reasoning",
|
|
725
|
+
provider: "openrouter",
|
|
726
|
+
contextLength: 1050000,
|
|
727
|
+
cost: "premium"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
id: "deepseek/deepseek-v4.1-flash",
|
|
731
|
+
name: "DeepSeek V4.1 Flash",
|
|
732
|
+
description: "Efficient open-weight model for coding and reasoning with native vision.",
|
|
733
|
+
category: "fast",
|
|
734
|
+
provider: "openrouter",
|
|
735
|
+
contextLength: 1048576,
|
|
736
|
+
cost: "lower-cost"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
id: "nex-agi/nex-n2.5-mini:free",
|
|
740
|
+
name: "Nex N2.5 Mini (Free)",
|
|
741
|
+
description: "Free open-weight model for agentic coding tasks.",
|
|
742
|
+
category: "smart",
|
|
743
|
+
provider: "openrouter",
|
|
744
|
+
contextLength: 262144,
|
|
745
|
+
cost: "free"
|
|
746
|
+
},
|
|
720
747
|
{
|
|
721
748
|
id: "inclusionai/ling-3.0-tiny:free",
|
|
722
749
|
name: "Ling 3.0 Tiny (Free)",
|
|
@@ -753,6 +780,15 @@ var OPENROUTER_MODELS = [
|
|
|
753
780
|
contextLength: 1e6,
|
|
754
781
|
cost: "free"
|
|
755
782
|
},
|
|
783
|
+
{
|
|
784
|
+
id: "poolside/laguna-s-2.1:free",
|
|
785
|
+
name: "Laguna S 2.1 (Free)",
|
|
786
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
787
|
+
category: "reasoning",
|
|
788
|
+
provider: "openrouter",
|
|
789
|
+
contextLength: 262144,
|
|
790
|
+
cost: "free"
|
|
791
|
+
},
|
|
756
792
|
{
|
|
757
793
|
id: "deepseek/deepseek-v4-flash-0731",
|
|
758
794
|
name: "DeepSeek V4 Flash 0731",
|
|
@@ -789,6 +825,15 @@ var OPENROUTER_MODELS = [
|
|
|
789
825
|
contextLength: 1048576,
|
|
790
826
|
cost: "lower-cost"
|
|
791
827
|
},
|
|
828
|
+
{
|
|
829
|
+
id: "z-ai/glm-5.3-flash",
|
|
830
|
+
name: "GLM 5.3 Flash",
|
|
831
|
+
description: "Open-weight multimodal GLM model optimized for efficient agentic coding.",
|
|
832
|
+
category: "smart",
|
|
833
|
+
provider: "openrouter",
|
|
834
|
+
contextLength: 1310720,
|
|
835
|
+
cost: "lower-cost"
|
|
836
|
+
},
|
|
792
837
|
{
|
|
793
838
|
id: "qwen/qwen3.6-27b",
|
|
794
839
|
name: "Qwen 3.6 27B",
|
|
@@ -870,6 +915,15 @@ var OPENROUTER_MODELS = [
|
|
|
870
915
|
contextLength: 1e6,
|
|
871
916
|
cost: "premium"
|
|
872
917
|
},
|
|
918
|
+
{
|
|
919
|
+
id: "anthropic/claude-fable-5.1",
|
|
920
|
+
name: "Claude Fable 5.1",
|
|
921
|
+
description: "Anthropic's latest model for demanding reasoning and long-running agents.",
|
|
922
|
+
category: "reasoning",
|
|
923
|
+
provider: "openrouter",
|
|
924
|
+
contextLength: 1e6,
|
|
925
|
+
cost: "premium"
|
|
926
|
+
},
|
|
873
927
|
{
|
|
874
928
|
id: "anthropic/claude-fable-5",
|
|
875
929
|
name: "Claude Fable 5",
|
|
@@ -883,10 +937,13 @@ var OPENROUTER_MODELS = [
|
|
|
883
937
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
884
938
|
...OPENROUTER_MODELS.filter((model) => [
|
|
885
939
|
"openai/gpt-5.6-luna",
|
|
940
|
+
"openai/gpt-6-astra",
|
|
941
|
+
"deepseek/deepseek-v4.1-flash",
|
|
886
942
|
"openai/gpt-5.6-terra",
|
|
887
943
|
"openai/gpt-5.6-sol",
|
|
888
944
|
"anthropic/claude-sonnet-5",
|
|
889
945
|
"anthropic/claude-opus-5",
|
|
946
|
+
"anthropic/claude-fable-5.1",
|
|
890
947
|
"anthropic/claude-fable-5"
|
|
891
948
|
].includes(model.id)).map((model) => ({ ...model, provider: "vercel-ai-gateway" })),
|
|
892
949
|
{
|
|
@@ -915,6 +972,24 @@ var VERCEL_AI_GATEWAY_MODELS = [
|
|
|
915
972
|
provider: "vercel-ai-gateway",
|
|
916
973
|
contextLength: 1e6,
|
|
917
974
|
cost: "lower-cost"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
id: "zai/glm-5.3-flash",
|
|
978
|
+
name: "GLM 5.3 Flash",
|
|
979
|
+
description: "Open-weight multimodal GLM model optimized for efficient agentic coding.",
|
|
980
|
+
category: "smart",
|
|
981
|
+
provider: "vercel-ai-gateway",
|
|
982
|
+
contextLength: 1e6,
|
|
983
|
+
cost: "lower-cost"
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
id: "poolside/laguna-s-2.1-free",
|
|
987
|
+
name: "Laguna S 2.1 (Free)",
|
|
988
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
989
|
+
category: "reasoning",
|
|
990
|
+
provider: "vercel-ai-gateway",
|
|
991
|
+
contextLength: 256000,
|
|
992
|
+
cost: "free"
|
|
918
993
|
}
|
|
919
994
|
];
|
|
920
995
|
var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
@@ -927,13 +1002,31 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
927
1002
|
contextLength: 32000,
|
|
928
1003
|
cost: "lower-cost"
|
|
929
1004
|
},
|
|
930
|
-
...VERCEL_AI_GATEWAY_MODELS.map((model) => ({
|
|
1005
|
+
...VERCEL_AI_GATEWAY_MODELS.filter((model) => model.id !== "deepseek/deepseek-v4.1-flash").map((model) => ({
|
|
931
1006
|
...model,
|
|
932
1007
|
id: model.id.startsWith("anthropic/") ? model.id.replaceAll(".", "-") : model.id,
|
|
933
1008
|
provider: "cloudflare-ai-gateway"
|
|
934
1009
|
}))
|
|
935
1010
|
];
|
|
936
1011
|
var WORKERS_AI_MODELS = [
|
|
1012
|
+
{
|
|
1013
|
+
id: "@cf/zai-org/glm-5.3",
|
|
1014
|
+
name: "GLM 5.3",
|
|
1015
|
+
description: "Open-weight flagship model for long-running agentic coding workflows.",
|
|
1016
|
+
category: "reasoning",
|
|
1017
|
+
provider: "workers-ai",
|
|
1018
|
+
contextLength: 1048576,
|
|
1019
|
+
cost: "lower-cost"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
id: "@cf/zai-org/glm-5.3-flash",
|
|
1023
|
+
name: "GLM 5.3 Flash",
|
|
1024
|
+
description: "Open-weight multimodal model for efficient reasoning and agentic coding.",
|
|
1025
|
+
category: "smart",
|
|
1026
|
+
provider: "workers-ai",
|
|
1027
|
+
contextLength: 1310720,
|
|
1028
|
+
cost: "lower-cost"
|
|
1029
|
+
},
|
|
937
1030
|
{
|
|
938
1031
|
id: "@cf/zai-org/glm-5.2",
|
|
939
1032
|
name: "GLM 5.2",
|
|
@@ -943,6 +1036,33 @@ var WORKERS_AI_MODELS = [
|
|
|
943
1036
|
contextLength: 262144,
|
|
944
1037
|
cost: "lower-cost"
|
|
945
1038
|
},
|
|
1039
|
+
{
|
|
1040
|
+
id: "@cf/deepseek-ai/deepseek-v4-flash-0731",
|
|
1041
|
+
name: "DeepSeek V4 Flash 0731",
|
|
1042
|
+
description: "Fast open-weight DeepSeek model with a one-million-token context window.",
|
|
1043
|
+
category: "fast",
|
|
1044
|
+
provider: "workers-ai",
|
|
1045
|
+
contextLength: 1048576,
|
|
1046
|
+
cost: "lower-cost"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
id: "@cf/deepseek-ai/deepseek-v4-pro-0813",
|
|
1050
|
+
name: "DeepSeek V4 Pro 0813",
|
|
1051
|
+
description: "Open-weight DeepSeek model for complex agentic work.",
|
|
1052
|
+
category: "reasoning",
|
|
1053
|
+
provider: "workers-ai",
|
|
1054
|
+
contextLength: 1048576,
|
|
1055
|
+
cost: "lower-cost"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
id: "@cf/qwen/qwen3.8-27b",
|
|
1059
|
+
name: "Qwen 3.8 27B",
|
|
1060
|
+
description: "Open-weight vision-language model with reasoning and function calling.",
|
|
1061
|
+
category: "smart",
|
|
1062
|
+
provider: "workers-ai",
|
|
1063
|
+
contextLength: 262144,
|
|
1064
|
+
cost: "lower-cost"
|
|
1065
|
+
},
|
|
946
1066
|
{
|
|
947
1067
|
id: "@cf/zai-org/glm-4.7-flash",
|
|
948
1068
|
name: "GLM 4.7 Flash",
|
|
@@ -1020,6 +1140,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
1020
1140
|
contextLength: 1e6,
|
|
1021
1141
|
cost: "free"
|
|
1022
1142
|
},
|
|
1143
|
+
{
|
|
1144
|
+
id: "laguna-s-2.1-free",
|
|
1145
|
+
name: "Laguna S 2.1 (Free)",
|
|
1146
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
1147
|
+
category: "reasoning",
|
|
1148
|
+
provider: "opencode-zen",
|
|
1149
|
+
zenApiType: "openai-compatible",
|
|
1150
|
+
contextLength: 262144,
|
|
1151
|
+
cost: "free"
|
|
1152
|
+
},
|
|
1023
1153
|
{
|
|
1024
1154
|
id: "minimax-m3",
|
|
1025
1155
|
name: "MiniMax M3",
|
|
@@ -1062,6 +1192,7 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
1062
1192
|
},
|
|
1063
1193
|
...[
|
|
1064
1194
|
["gpt-5.6-luna", "GPT 5.6 Luna", "fast", "lower-cost"],
|
|
1195
|
+
["gpt-6-astra", "GPT 6 Astra", "reasoning", "premium"],
|
|
1065
1196
|
["gpt-5.6-terra", "GPT 5.6 Terra", "smart", "premium"],
|
|
1066
1197
|
["gpt-5.6-sol", "GPT 5.6 Sol", "reasoning", "premium"]
|
|
1067
1198
|
].map(([id, name, category, cost]) => ({
|
|
@@ -1094,6 +1225,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
1094
1225
|
contextLength: 1e6,
|
|
1095
1226
|
cost: "premium"
|
|
1096
1227
|
},
|
|
1228
|
+
{
|
|
1229
|
+
id: "claude-fable-5-1",
|
|
1230
|
+
name: "Claude Fable 5.1",
|
|
1231
|
+
description: "Anthropic's latest model for demanding reasoning and long-running agents.",
|
|
1232
|
+
category: "reasoning",
|
|
1233
|
+
provider: "opencode-zen",
|
|
1234
|
+
zenApiType: "anthropic",
|
|
1235
|
+
contextLength: 1e6,
|
|
1236
|
+
cost: "premium"
|
|
1237
|
+
},
|
|
1097
1238
|
{
|
|
1098
1239
|
id: "claude-fable-5",
|
|
1099
1240
|
name: "Claude Fable 5",
|
|
@@ -1147,6 +1288,22 @@ function getProviderDisplayName(provider) {
|
|
|
1147
1288
|
return "Custom";
|
|
1148
1289
|
}
|
|
1149
1290
|
}
|
|
1291
|
+
function getApiKeyUrl(provider) {
|
|
1292
|
+
switch (provider) {
|
|
1293
|
+
case "opencode-zen":
|
|
1294
|
+
return "https://opencode.ai/auth";
|
|
1295
|
+
case "openrouter":
|
|
1296
|
+
return "https://openrouter.ai/keys";
|
|
1297
|
+
case "vercel-ai-gateway":
|
|
1298
|
+
return "https://vercel.com/docs/ai-gateway";
|
|
1299
|
+
case "cloudflare-ai-gateway":
|
|
1300
|
+
return "https://developers.cloudflare.com/ai-gateway/";
|
|
1301
|
+
case "workers-ai":
|
|
1302
|
+
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
1303
|
+
case "custom":
|
|
1304
|
+
return "";
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1150
1307
|
var COST_TIER_ORDER = { free: 0, "lower-cost": 1, premium: 2 };
|
|
1151
1308
|
var CATEGORY_ORDER = { fast: 0, smart: 1, reasoning: 2 };
|
|
1152
1309
|
function sortModelsByCost(models) {
|
|
@@ -49087,7 +49244,7 @@ function getThinkingLevel(config2) {
|
|
|
49087
49244
|
return config2?.thinkingLevel || "low";
|
|
49088
49245
|
}
|
|
49089
49246
|
function supportsThinkingControl(modelId) {
|
|
49090
|
-
return modelId.includes("thinking") || modelId.includes("gpt-5") || modelId.includes("claude-") || modelId.includes("gemini-");
|
|
49247
|
+
return modelId.includes("thinking") || modelId.includes("gpt-5") || modelId.includes("gpt-6") || modelId.includes("claude-") || modelId.includes("gemini-");
|
|
49091
49248
|
}
|
|
49092
49249
|
function buildOpenRouterThinkingOptions(modelId, thinkingLevel) {
|
|
49093
49250
|
if (thinkingLevel === "off" || !supportsThinkingControl(modelId)) {
|
|
@@ -49166,6 +49323,8 @@ function buildAiSdkProviderOptions(modelId, thinkingLevel, providerOptionsName)
|
|
|
49166
49323
|
return;
|
|
49167
49324
|
}
|
|
49168
49325
|
function shouldOmitTemperature(modelId, thinkingLevel) {
|
|
49326
|
+
if (modelId.includes("gpt-6"))
|
|
49327
|
+
return true;
|
|
49169
49328
|
return thinkingLevel !== "off" && (modelId.startsWith("claude-") || modelId.includes("gpt-5"));
|
|
49170
49329
|
}
|
|
49171
49330
|
async function callOpenRouter(apiKey, modelId, systemPrompt, userInput, thinkingLevel) {
|
|
@@ -49876,11 +50035,6 @@ function shouldRunStartupUpdateCheck(args) {
|
|
|
49876
50035
|
return !skipFlags.has(args[0]);
|
|
49877
50036
|
}
|
|
49878
50037
|
|
|
49879
|
-
// src/lib/format.ts
|
|
49880
|
-
function formatExecutedCommand(command, colors) {
|
|
49881
|
-
return `${colors.dim}Command:${colors.reset} ${command}`;
|
|
49882
|
-
}
|
|
49883
|
-
|
|
49884
50038
|
// src/index.ts
|
|
49885
50039
|
loadTheme();
|
|
49886
50040
|
var getColors = () => {
|
|
@@ -50026,22 +50180,6 @@ function validateApiKey(key, provider) {
|
|
|
50026
50180
|
}
|
|
50027
50181
|
return null;
|
|
50028
50182
|
}
|
|
50029
|
-
function getApiKeyUrl(provider) {
|
|
50030
|
-
switch (provider) {
|
|
50031
|
-
case "opencode-zen":
|
|
50032
|
-
return "https://opencode.ai/auth";
|
|
50033
|
-
case "openrouter":
|
|
50034
|
-
return "https://openrouter.ai/keys";
|
|
50035
|
-
case "vercel-ai-gateway":
|
|
50036
|
-
return "https://vercel.com/docs/ai-gateway";
|
|
50037
|
-
case "cloudflare-ai-gateway":
|
|
50038
|
-
return "https://developers.cloudflare.com/ai-gateway/";
|
|
50039
|
-
case "workers-ai":
|
|
50040
|
-
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
50041
|
-
case "custom":
|
|
50042
|
-
return "";
|
|
50043
|
-
}
|
|
50044
|
-
}
|
|
50045
50183
|
async function setup() {
|
|
50046
50184
|
const readline = await import("readline");
|
|
50047
50185
|
const rl = readline.createInterface({
|
|
@@ -50341,7 +50479,7 @@ async function translate(query, options) {
|
|
|
50341
50479
|
console.error(`${colors.yellow}Use -n to preview, or run the command manually.${colors.reset}`);
|
|
50342
50480
|
process.exit(1);
|
|
50343
50481
|
}
|
|
50344
|
-
console.error(
|
|
50482
|
+
console.error(`${colors.dim}Command:${colors.reset} ${command}`);
|
|
50345
50483
|
const result = await executeCommand(command);
|
|
50346
50484
|
process.exit(result.code);
|
|
50347
50485
|
} else {
|
package/dist/tui.js
CHANGED
|
@@ -33059,6 +33059,33 @@ import { cwd as getCwd } from "process";
|
|
|
33059
33059
|
|
|
33060
33060
|
// src/lib/models.ts
|
|
33061
33061
|
var OPENROUTER_MODELS = [
|
|
33062
|
+
{
|
|
33063
|
+
id: "openai/gpt-6-astra",
|
|
33064
|
+
name: "GPT 6 Astra",
|
|
33065
|
+
description: "OpenAI's flagship model for complex reasoning and coding.",
|
|
33066
|
+
category: "reasoning",
|
|
33067
|
+
provider: "openrouter",
|
|
33068
|
+
contextLength: 1050000,
|
|
33069
|
+
cost: "premium"
|
|
33070
|
+
},
|
|
33071
|
+
{
|
|
33072
|
+
id: "deepseek/deepseek-v4.1-flash",
|
|
33073
|
+
name: "DeepSeek V4.1 Flash",
|
|
33074
|
+
description: "Efficient open-weight model for coding and reasoning with native vision.",
|
|
33075
|
+
category: "fast",
|
|
33076
|
+
provider: "openrouter",
|
|
33077
|
+
contextLength: 1048576,
|
|
33078
|
+
cost: "lower-cost"
|
|
33079
|
+
},
|
|
33080
|
+
{
|
|
33081
|
+
id: "nex-agi/nex-n2.5-mini:free",
|
|
33082
|
+
name: "Nex N2.5 Mini (Free)",
|
|
33083
|
+
description: "Free open-weight model for agentic coding tasks.",
|
|
33084
|
+
category: "smart",
|
|
33085
|
+
provider: "openrouter",
|
|
33086
|
+
contextLength: 262144,
|
|
33087
|
+
cost: "free"
|
|
33088
|
+
},
|
|
33062
33089
|
{
|
|
33063
33090
|
id: "inclusionai/ling-3.0-tiny:free",
|
|
33064
33091
|
name: "Ling 3.0 Tiny (Free)",
|
|
@@ -33095,6 +33122,15 @@ var OPENROUTER_MODELS = [
|
|
|
33095
33122
|
contextLength: 1e6,
|
|
33096
33123
|
cost: "free"
|
|
33097
33124
|
},
|
|
33125
|
+
{
|
|
33126
|
+
id: "poolside/laguna-s-2.1:free",
|
|
33127
|
+
name: "Laguna S 2.1 (Free)",
|
|
33128
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
33129
|
+
category: "reasoning",
|
|
33130
|
+
provider: "openrouter",
|
|
33131
|
+
contextLength: 262144,
|
|
33132
|
+
cost: "free"
|
|
33133
|
+
},
|
|
33098
33134
|
{
|
|
33099
33135
|
id: "deepseek/deepseek-v4-flash-0731",
|
|
33100
33136
|
name: "DeepSeek V4 Flash 0731",
|
|
@@ -33131,6 +33167,15 @@ var OPENROUTER_MODELS = [
|
|
|
33131
33167
|
contextLength: 1048576,
|
|
33132
33168
|
cost: "lower-cost"
|
|
33133
33169
|
},
|
|
33170
|
+
{
|
|
33171
|
+
id: "z-ai/glm-5.3-flash",
|
|
33172
|
+
name: "GLM 5.3 Flash",
|
|
33173
|
+
description: "Open-weight multimodal GLM model optimized for efficient agentic coding.",
|
|
33174
|
+
category: "smart",
|
|
33175
|
+
provider: "openrouter",
|
|
33176
|
+
contextLength: 1310720,
|
|
33177
|
+
cost: "lower-cost"
|
|
33178
|
+
},
|
|
33134
33179
|
{
|
|
33135
33180
|
id: "qwen/qwen3.6-27b",
|
|
33136
33181
|
name: "Qwen 3.6 27B",
|
|
@@ -33212,6 +33257,15 @@ var OPENROUTER_MODELS = [
|
|
|
33212
33257
|
contextLength: 1e6,
|
|
33213
33258
|
cost: "premium"
|
|
33214
33259
|
},
|
|
33260
|
+
{
|
|
33261
|
+
id: "anthropic/claude-fable-5.1",
|
|
33262
|
+
name: "Claude Fable 5.1",
|
|
33263
|
+
description: "Anthropic's latest model for demanding reasoning and long-running agents.",
|
|
33264
|
+
category: "reasoning",
|
|
33265
|
+
provider: "openrouter",
|
|
33266
|
+
contextLength: 1e6,
|
|
33267
|
+
cost: "premium"
|
|
33268
|
+
},
|
|
33215
33269
|
{
|
|
33216
33270
|
id: "anthropic/claude-fable-5",
|
|
33217
33271
|
name: "Claude Fable 5",
|
|
@@ -33225,10 +33279,13 @@ var OPENROUTER_MODELS = [
|
|
|
33225
33279
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
33226
33280
|
...OPENROUTER_MODELS.filter((model) => [
|
|
33227
33281
|
"openai/gpt-5.6-luna",
|
|
33282
|
+
"openai/gpt-6-astra",
|
|
33283
|
+
"deepseek/deepseek-v4.1-flash",
|
|
33228
33284
|
"openai/gpt-5.6-terra",
|
|
33229
33285
|
"openai/gpt-5.6-sol",
|
|
33230
33286
|
"anthropic/claude-sonnet-5",
|
|
33231
33287
|
"anthropic/claude-opus-5",
|
|
33288
|
+
"anthropic/claude-fable-5.1",
|
|
33232
33289
|
"anthropic/claude-fable-5"
|
|
33233
33290
|
].includes(model.id)).map((model) => ({ ...model, provider: "vercel-ai-gateway" })),
|
|
33234
33291
|
{
|
|
@@ -33257,6 +33314,24 @@ var VERCEL_AI_GATEWAY_MODELS = [
|
|
|
33257
33314
|
provider: "vercel-ai-gateway",
|
|
33258
33315
|
contextLength: 1e6,
|
|
33259
33316
|
cost: "lower-cost"
|
|
33317
|
+
},
|
|
33318
|
+
{
|
|
33319
|
+
id: "zai/glm-5.3-flash",
|
|
33320
|
+
name: "GLM 5.3 Flash",
|
|
33321
|
+
description: "Open-weight multimodal GLM model optimized for efficient agentic coding.",
|
|
33322
|
+
category: "smart",
|
|
33323
|
+
provider: "vercel-ai-gateway",
|
|
33324
|
+
contextLength: 1e6,
|
|
33325
|
+
cost: "lower-cost"
|
|
33326
|
+
},
|
|
33327
|
+
{
|
|
33328
|
+
id: "poolside/laguna-s-2.1-free",
|
|
33329
|
+
name: "Laguna S 2.1 (Free)",
|
|
33330
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
33331
|
+
category: "reasoning",
|
|
33332
|
+
provider: "vercel-ai-gateway",
|
|
33333
|
+
contextLength: 256000,
|
|
33334
|
+
cost: "free"
|
|
33260
33335
|
}
|
|
33261
33336
|
];
|
|
33262
33337
|
var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
@@ -33269,13 +33344,31 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
33269
33344
|
contextLength: 32000,
|
|
33270
33345
|
cost: "lower-cost"
|
|
33271
33346
|
},
|
|
33272
|
-
...VERCEL_AI_GATEWAY_MODELS.map((model) => ({
|
|
33347
|
+
...VERCEL_AI_GATEWAY_MODELS.filter((model) => model.id !== "deepseek/deepseek-v4.1-flash").map((model) => ({
|
|
33273
33348
|
...model,
|
|
33274
33349
|
id: model.id.startsWith("anthropic/") ? model.id.replaceAll(".", "-") : model.id,
|
|
33275
33350
|
provider: "cloudflare-ai-gateway"
|
|
33276
33351
|
}))
|
|
33277
33352
|
];
|
|
33278
33353
|
var WORKERS_AI_MODELS = [
|
|
33354
|
+
{
|
|
33355
|
+
id: "@cf/zai-org/glm-5.3",
|
|
33356
|
+
name: "GLM 5.3",
|
|
33357
|
+
description: "Open-weight flagship model for long-running agentic coding workflows.",
|
|
33358
|
+
category: "reasoning",
|
|
33359
|
+
provider: "workers-ai",
|
|
33360
|
+
contextLength: 1048576,
|
|
33361
|
+
cost: "lower-cost"
|
|
33362
|
+
},
|
|
33363
|
+
{
|
|
33364
|
+
id: "@cf/zai-org/glm-5.3-flash",
|
|
33365
|
+
name: "GLM 5.3 Flash",
|
|
33366
|
+
description: "Open-weight multimodal model for efficient reasoning and agentic coding.",
|
|
33367
|
+
category: "smart",
|
|
33368
|
+
provider: "workers-ai",
|
|
33369
|
+
contextLength: 1310720,
|
|
33370
|
+
cost: "lower-cost"
|
|
33371
|
+
},
|
|
33279
33372
|
{
|
|
33280
33373
|
id: "@cf/zai-org/glm-5.2",
|
|
33281
33374
|
name: "GLM 5.2",
|
|
@@ -33285,6 +33378,33 @@ var WORKERS_AI_MODELS = [
|
|
|
33285
33378
|
contextLength: 262144,
|
|
33286
33379
|
cost: "lower-cost"
|
|
33287
33380
|
},
|
|
33381
|
+
{
|
|
33382
|
+
id: "@cf/deepseek-ai/deepseek-v4-flash-0731",
|
|
33383
|
+
name: "DeepSeek V4 Flash 0731",
|
|
33384
|
+
description: "Fast open-weight DeepSeek model with a one-million-token context window.",
|
|
33385
|
+
category: "fast",
|
|
33386
|
+
provider: "workers-ai",
|
|
33387
|
+
contextLength: 1048576,
|
|
33388
|
+
cost: "lower-cost"
|
|
33389
|
+
},
|
|
33390
|
+
{
|
|
33391
|
+
id: "@cf/deepseek-ai/deepseek-v4-pro-0813",
|
|
33392
|
+
name: "DeepSeek V4 Pro 0813",
|
|
33393
|
+
description: "Open-weight DeepSeek model for complex agentic work.",
|
|
33394
|
+
category: "reasoning",
|
|
33395
|
+
provider: "workers-ai",
|
|
33396
|
+
contextLength: 1048576,
|
|
33397
|
+
cost: "lower-cost"
|
|
33398
|
+
},
|
|
33399
|
+
{
|
|
33400
|
+
id: "@cf/qwen/qwen3.8-27b",
|
|
33401
|
+
name: "Qwen 3.8 27B",
|
|
33402
|
+
description: "Open-weight vision-language model with reasoning and function calling.",
|
|
33403
|
+
category: "smart",
|
|
33404
|
+
provider: "workers-ai",
|
|
33405
|
+
contextLength: 262144,
|
|
33406
|
+
cost: "lower-cost"
|
|
33407
|
+
},
|
|
33288
33408
|
{
|
|
33289
33409
|
id: "@cf/zai-org/glm-4.7-flash",
|
|
33290
33410
|
name: "GLM 4.7 Flash",
|
|
@@ -33362,6 +33482,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33362
33482
|
contextLength: 1e6,
|
|
33363
33483
|
cost: "free"
|
|
33364
33484
|
},
|
|
33485
|
+
{
|
|
33486
|
+
id: "laguna-s-2.1-free",
|
|
33487
|
+
name: "Laguna S 2.1 (Free)",
|
|
33488
|
+
description: "Open-weight coding model for long-horizon agentic work.",
|
|
33489
|
+
category: "reasoning",
|
|
33490
|
+
provider: "opencode-zen",
|
|
33491
|
+
zenApiType: "openai-compatible",
|
|
33492
|
+
contextLength: 262144,
|
|
33493
|
+
cost: "free"
|
|
33494
|
+
},
|
|
33365
33495
|
{
|
|
33366
33496
|
id: "minimax-m3",
|
|
33367
33497
|
name: "MiniMax M3",
|
|
@@ -33404,6 +33534,7 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33404
33534
|
},
|
|
33405
33535
|
...[
|
|
33406
33536
|
["gpt-5.6-luna", "GPT 5.6 Luna", "fast", "lower-cost"],
|
|
33537
|
+
["gpt-6-astra", "GPT 6 Astra", "reasoning", "premium"],
|
|
33407
33538
|
["gpt-5.6-terra", "GPT 5.6 Terra", "smart", "premium"],
|
|
33408
33539
|
["gpt-5.6-sol", "GPT 5.6 Sol", "reasoning", "premium"]
|
|
33409
33540
|
].map(([id, name, category, cost]) => ({
|
|
@@ -33436,6 +33567,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33436
33567
|
contextLength: 1e6,
|
|
33437
33568
|
cost: "premium"
|
|
33438
33569
|
},
|
|
33570
|
+
{
|
|
33571
|
+
id: "claude-fable-5-1",
|
|
33572
|
+
name: "Claude Fable 5.1",
|
|
33573
|
+
description: "Anthropic's latest model for demanding reasoning and long-running agents.",
|
|
33574
|
+
category: "reasoning",
|
|
33575
|
+
provider: "opencode-zen",
|
|
33576
|
+
zenApiType: "anthropic",
|
|
33577
|
+
contextLength: 1e6,
|
|
33578
|
+
cost: "premium"
|
|
33579
|
+
},
|
|
33439
33580
|
{
|
|
33440
33581
|
id: "claude-fable-5",
|
|
33441
33582
|
name: "Claude Fable 5",
|
|
@@ -33489,6 +33630,22 @@ function getProviderDisplayName(provider) {
|
|
|
33489
33630
|
return "Custom";
|
|
33490
33631
|
}
|
|
33491
33632
|
}
|
|
33633
|
+
function getApiKeyUrl(provider) {
|
|
33634
|
+
switch (provider) {
|
|
33635
|
+
case "opencode-zen":
|
|
33636
|
+
return "https://opencode.ai/auth";
|
|
33637
|
+
case "openrouter":
|
|
33638
|
+
return "https://openrouter.ai/keys";
|
|
33639
|
+
case "vercel-ai-gateway":
|
|
33640
|
+
return "https://vercel.com/docs/ai-gateway";
|
|
33641
|
+
case "cloudflare-ai-gateway":
|
|
33642
|
+
return "https://developers.cloudflare.com/ai-gateway/";
|
|
33643
|
+
case "workers-ai":
|
|
33644
|
+
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
33645
|
+
case "custom":
|
|
33646
|
+
return "";
|
|
33647
|
+
}
|
|
33648
|
+
}
|
|
33492
33649
|
var COST_TIER_ORDER = { free: 0, "lower-cost": 1, premium: 2 };
|
|
33493
33650
|
var CATEGORY_ORDER = { fast: 0, smart: 1, reasoning: 2 };
|
|
33494
33651
|
function sortModelsByCost(models) {
|
|
@@ -81169,7 +81326,7 @@ function getThinkingLevel(config2) {
|
|
|
81169
81326
|
return config2?.thinkingLevel || "low";
|
|
81170
81327
|
}
|
|
81171
81328
|
function supportsThinkingControl(modelId) {
|
|
81172
|
-
return modelId.includes("thinking") || modelId.includes("gpt-5") || modelId.includes("claude-") || modelId.includes("gemini-");
|
|
81329
|
+
return modelId.includes("thinking") || modelId.includes("gpt-5") || modelId.includes("gpt-6") || modelId.includes("claude-") || modelId.includes("gemini-");
|
|
81173
81330
|
}
|
|
81174
81331
|
function buildOpenRouterThinkingOptions(modelId, thinkingLevel) {
|
|
81175
81332
|
if (thinkingLevel === "off" || !supportsThinkingControl(modelId)) {
|
|
@@ -81248,6 +81405,8 @@ function buildAiSdkProviderOptions(modelId, thinkingLevel, providerOptionsName)
|
|
|
81248
81405
|
return;
|
|
81249
81406
|
}
|
|
81250
81407
|
function shouldOmitTemperature(modelId, thinkingLevel) {
|
|
81408
|
+
if (modelId.includes("gpt-6"))
|
|
81409
|
+
return true;
|
|
81251
81410
|
return thinkingLevel !== "off" && (modelId.startsWith("claude-") || modelId.includes("gpt-5"));
|
|
81252
81411
|
}
|
|
81253
81412
|
async function callOpenRouter(apiKey, modelId, systemPrompt, userInput, thinkingLevel) {
|
|
@@ -81940,22 +82099,6 @@ var statusBarText;
|
|
|
81940
82099
|
var chatScrollBox;
|
|
81941
82100
|
var inputField;
|
|
81942
82101
|
var inputContainer;
|
|
81943
|
-
function getApiKeyUrl(provider) {
|
|
81944
|
-
switch (provider) {
|
|
81945
|
-
case "opencode-zen":
|
|
81946
|
-
return "https://opencode.ai/auth";
|
|
81947
|
-
case "openrouter":
|
|
81948
|
-
return "https://openrouter.ai/keys";
|
|
81949
|
-
case "vercel-ai-gateway":
|
|
81950
|
-
return "https://vercel.com/docs/ai-gateway";
|
|
81951
|
-
case "cloudflare-ai-gateway":
|
|
81952
|
-
return "https://developers.cloudflare.com/ai-gateway/";
|
|
81953
|
-
case "workers-ai":
|
|
81954
|
-
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
81955
|
-
case "custom":
|
|
81956
|
-
return "";
|
|
81957
|
-
}
|
|
81958
|
-
}
|
|
81959
82102
|
var inputHintText;
|
|
81960
82103
|
var helpBarText;
|
|
81961
82104
|
var slashCommandMatches = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@austinthesing/magic-shell",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
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",
|