@austinthesing/magic-shell 1.1.4 → 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 +70 -18
- package/dist/index.js +71 -24
- package/dist/tui.js +70 -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)",
|
|
@@ -33230,6 +33257,15 @@ var OPENROUTER_MODELS = [
|
|
|
33230
33257
|
contextLength: 1e6,
|
|
33231
33258
|
cost: "premium"
|
|
33232
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
|
+
},
|
|
33233
33269
|
{
|
|
33234
33270
|
id: "anthropic/claude-fable-5",
|
|
33235
33271
|
name: "Claude Fable 5",
|
|
@@ -33243,10 +33279,13 @@ var OPENROUTER_MODELS = [
|
|
|
33243
33279
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
33244
33280
|
...OPENROUTER_MODELS.filter((model) => [
|
|
33245
33281
|
"openai/gpt-5.6-luna",
|
|
33282
|
+
"openai/gpt-6-astra",
|
|
33283
|
+
"deepseek/deepseek-v4.1-flash",
|
|
33246
33284
|
"openai/gpt-5.6-terra",
|
|
33247
33285
|
"openai/gpt-5.6-sol",
|
|
33248
33286
|
"anthropic/claude-sonnet-5",
|
|
33249
33287
|
"anthropic/claude-opus-5",
|
|
33288
|
+
"anthropic/claude-fable-5.1",
|
|
33250
33289
|
"anthropic/claude-fable-5"
|
|
33251
33290
|
].includes(model.id)).map((model) => ({ ...model, provider: "vercel-ai-gateway" })),
|
|
33252
33291
|
{
|
|
@@ -33305,7 +33344,7 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
33305
33344
|
contextLength: 32000,
|
|
33306
33345
|
cost: "lower-cost"
|
|
33307
33346
|
},
|
|
33308
|
-
...VERCEL_AI_GATEWAY_MODELS.map((model) => ({
|
|
33347
|
+
...VERCEL_AI_GATEWAY_MODELS.filter((model) => model.id !== "deepseek/deepseek-v4.1-flash").map((model) => ({
|
|
33309
33348
|
...model,
|
|
33310
33349
|
id: model.id.startsWith("anthropic/") ? model.id.replaceAll(".", "-") : model.id,
|
|
33311
33350
|
provider: "cloudflare-ai-gateway"
|
|
@@ -33495,6 +33534,7 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33495
33534
|
},
|
|
33496
33535
|
...[
|
|
33497
33536
|
["gpt-5.6-luna", "GPT 5.6 Luna", "fast", "lower-cost"],
|
|
33537
|
+
["gpt-6-astra", "GPT 6 Astra", "reasoning", "premium"],
|
|
33498
33538
|
["gpt-5.6-terra", "GPT 5.6 Terra", "smart", "premium"],
|
|
33499
33539
|
["gpt-5.6-sol", "GPT 5.6 Sol", "reasoning", "premium"]
|
|
33500
33540
|
].map(([id, name, category, cost]) => ({
|
|
@@ -33527,6 +33567,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33527
33567
|
contextLength: 1e6,
|
|
33528
33568
|
cost: "premium"
|
|
33529
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
|
+
},
|
|
33530
33580
|
{
|
|
33531
33581
|
id: "claude-fable-5",
|
|
33532
33582
|
name: "Claude Fable 5",
|
|
@@ -33580,6 +33630,22 @@ function getProviderDisplayName(provider) {
|
|
|
33580
33630
|
return "Custom";
|
|
33581
33631
|
}
|
|
33582
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
|
+
}
|
|
33583
33649
|
var COST_TIER_ORDER = { free: 0, "lower-cost": 1, premium: 2 };
|
|
33584
33650
|
var CATEGORY_ORDER = { fast: 0, smart: 1, reasoning: 2 };
|
|
33585
33651
|
function sortModelsByCost(models) {
|
|
@@ -81260,7 +81326,7 @@ function getThinkingLevel(config2) {
|
|
|
81260
81326
|
return config2?.thinkingLevel || "low";
|
|
81261
81327
|
}
|
|
81262
81328
|
function supportsThinkingControl(modelId) {
|
|
81263
|
-
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-");
|
|
81264
81330
|
}
|
|
81265
81331
|
function buildOpenRouterThinkingOptions(modelId, thinkingLevel) {
|
|
81266
81332
|
if (thinkingLevel === "off" || !supportsThinkingControl(modelId)) {
|
|
@@ -81339,6 +81405,8 @@ function buildAiSdkProviderOptions(modelId, thinkingLevel, providerOptionsName)
|
|
|
81339
81405
|
return;
|
|
81340
81406
|
}
|
|
81341
81407
|
function shouldOmitTemperature(modelId, thinkingLevel) {
|
|
81408
|
+
if (modelId.includes("gpt-6"))
|
|
81409
|
+
return true;
|
|
81342
81410
|
return thinkingLevel !== "off" && (modelId.startsWith("claude-") || modelId.includes("gpt-5"));
|
|
81343
81411
|
}
|
|
81344
81412
|
async function callOpenRouter(apiKey, modelId, systemPrompt, userInput, thinkingLevel) {
|
|
@@ -82031,22 +82099,6 @@ var statusBarText;
|
|
|
82031
82099
|
var chatScrollBox;
|
|
82032
82100
|
var inputField;
|
|
82033
82101
|
var inputContainer;
|
|
82034
|
-
function getApiKeyUrl(provider) {
|
|
82035
|
-
switch (provider) {
|
|
82036
|
-
case "opencode-zen":
|
|
82037
|
-
return "https://opencode.ai/auth";
|
|
82038
|
-
case "openrouter":
|
|
82039
|
-
return "https://openrouter.ai/keys";
|
|
82040
|
-
case "vercel-ai-gateway":
|
|
82041
|
-
return "https://vercel.com/docs/ai-gateway";
|
|
82042
|
-
case "cloudflare-ai-gateway":
|
|
82043
|
-
return "https://developers.cloudflare.com/ai-gateway/";
|
|
82044
|
-
case "workers-ai":
|
|
82045
|
-
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
82046
|
-
case "custom":
|
|
82047
|
-
return "";
|
|
82048
|
-
}
|
|
82049
|
-
}
|
|
82050
82102
|
var inputHintText;
|
|
82051
82103
|
var helpBarText;
|
|
82052
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)",
|
|
@@ -888,6 +915,15 @@ var OPENROUTER_MODELS = [
|
|
|
888
915
|
contextLength: 1e6,
|
|
889
916
|
cost: "premium"
|
|
890
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
|
+
},
|
|
891
927
|
{
|
|
892
928
|
id: "anthropic/claude-fable-5",
|
|
893
929
|
name: "Claude Fable 5",
|
|
@@ -901,10 +937,13 @@ var OPENROUTER_MODELS = [
|
|
|
901
937
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
902
938
|
...OPENROUTER_MODELS.filter((model) => [
|
|
903
939
|
"openai/gpt-5.6-luna",
|
|
940
|
+
"openai/gpt-6-astra",
|
|
941
|
+
"deepseek/deepseek-v4.1-flash",
|
|
904
942
|
"openai/gpt-5.6-terra",
|
|
905
943
|
"openai/gpt-5.6-sol",
|
|
906
944
|
"anthropic/claude-sonnet-5",
|
|
907
945
|
"anthropic/claude-opus-5",
|
|
946
|
+
"anthropic/claude-fable-5.1",
|
|
908
947
|
"anthropic/claude-fable-5"
|
|
909
948
|
].includes(model.id)).map((model) => ({ ...model, provider: "vercel-ai-gateway" })),
|
|
910
949
|
{
|
|
@@ -963,7 +1002,7 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
963
1002
|
contextLength: 32000,
|
|
964
1003
|
cost: "lower-cost"
|
|
965
1004
|
},
|
|
966
|
-
...VERCEL_AI_GATEWAY_MODELS.map((model) => ({
|
|
1005
|
+
...VERCEL_AI_GATEWAY_MODELS.filter((model) => model.id !== "deepseek/deepseek-v4.1-flash").map((model) => ({
|
|
967
1006
|
...model,
|
|
968
1007
|
id: model.id.startsWith("anthropic/") ? model.id.replaceAll(".", "-") : model.id,
|
|
969
1008
|
provider: "cloudflare-ai-gateway"
|
|
@@ -1153,6 +1192,7 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
1153
1192
|
},
|
|
1154
1193
|
...[
|
|
1155
1194
|
["gpt-5.6-luna", "GPT 5.6 Luna", "fast", "lower-cost"],
|
|
1195
|
+
["gpt-6-astra", "GPT 6 Astra", "reasoning", "premium"],
|
|
1156
1196
|
["gpt-5.6-terra", "GPT 5.6 Terra", "smart", "premium"],
|
|
1157
1197
|
["gpt-5.6-sol", "GPT 5.6 Sol", "reasoning", "premium"]
|
|
1158
1198
|
].map(([id, name, category, cost]) => ({
|
|
@@ -1185,6 +1225,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
1185
1225
|
contextLength: 1e6,
|
|
1186
1226
|
cost: "premium"
|
|
1187
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
|
+
},
|
|
1188
1238
|
{
|
|
1189
1239
|
id: "claude-fable-5",
|
|
1190
1240
|
name: "Claude Fable 5",
|
|
@@ -1238,6 +1288,22 @@ function getProviderDisplayName(provider) {
|
|
|
1238
1288
|
return "Custom";
|
|
1239
1289
|
}
|
|
1240
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
|
+
}
|
|
1241
1307
|
var COST_TIER_ORDER = { free: 0, "lower-cost": 1, premium: 2 };
|
|
1242
1308
|
var CATEGORY_ORDER = { fast: 0, smart: 1, reasoning: 2 };
|
|
1243
1309
|
function sortModelsByCost(models) {
|
|
@@ -49178,7 +49244,7 @@ function getThinkingLevel(config2) {
|
|
|
49178
49244
|
return config2?.thinkingLevel || "low";
|
|
49179
49245
|
}
|
|
49180
49246
|
function supportsThinkingControl(modelId) {
|
|
49181
|
-
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-");
|
|
49182
49248
|
}
|
|
49183
49249
|
function buildOpenRouterThinkingOptions(modelId, thinkingLevel) {
|
|
49184
49250
|
if (thinkingLevel === "off" || !supportsThinkingControl(modelId)) {
|
|
@@ -49257,6 +49323,8 @@ function buildAiSdkProviderOptions(modelId, thinkingLevel, providerOptionsName)
|
|
|
49257
49323
|
return;
|
|
49258
49324
|
}
|
|
49259
49325
|
function shouldOmitTemperature(modelId, thinkingLevel) {
|
|
49326
|
+
if (modelId.includes("gpt-6"))
|
|
49327
|
+
return true;
|
|
49260
49328
|
return thinkingLevel !== "off" && (modelId.startsWith("claude-") || modelId.includes("gpt-5"));
|
|
49261
49329
|
}
|
|
49262
49330
|
async function callOpenRouter(apiKey, modelId, systemPrompt, userInput, thinkingLevel) {
|
|
@@ -49967,11 +50035,6 @@ function shouldRunStartupUpdateCheck(args) {
|
|
|
49967
50035
|
return !skipFlags.has(args[0]);
|
|
49968
50036
|
}
|
|
49969
50037
|
|
|
49970
|
-
// src/lib/format.ts
|
|
49971
|
-
function formatExecutedCommand(command, colors) {
|
|
49972
|
-
return `${colors.dim}Command:${colors.reset} ${command}`;
|
|
49973
|
-
}
|
|
49974
|
-
|
|
49975
50038
|
// src/index.ts
|
|
49976
50039
|
loadTheme();
|
|
49977
50040
|
var getColors = () => {
|
|
@@ -50117,22 +50180,6 @@ function validateApiKey(key, provider) {
|
|
|
50117
50180
|
}
|
|
50118
50181
|
return null;
|
|
50119
50182
|
}
|
|
50120
|
-
function getApiKeyUrl(provider) {
|
|
50121
|
-
switch (provider) {
|
|
50122
|
-
case "opencode-zen":
|
|
50123
|
-
return "https://opencode.ai/auth";
|
|
50124
|
-
case "openrouter":
|
|
50125
|
-
return "https://openrouter.ai/keys";
|
|
50126
|
-
case "vercel-ai-gateway":
|
|
50127
|
-
return "https://vercel.com/docs/ai-gateway";
|
|
50128
|
-
case "cloudflare-ai-gateway":
|
|
50129
|
-
return "https://developers.cloudflare.com/ai-gateway/";
|
|
50130
|
-
case "workers-ai":
|
|
50131
|
-
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
50132
|
-
case "custom":
|
|
50133
|
-
return "";
|
|
50134
|
-
}
|
|
50135
|
-
}
|
|
50136
50183
|
async function setup() {
|
|
50137
50184
|
const readline = await import("readline");
|
|
50138
50185
|
const rl = readline.createInterface({
|
|
@@ -50432,7 +50479,7 @@ async function translate(query, options) {
|
|
|
50432
50479
|
console.error(`${colors.yellow}Use -n to preview, or run the command manually.${colors.reset}`);
|
|
50433
50480
|
process.exit(1);
|
|
50434
50481
|
}
|
|
50435
|
-
console.error(
|
|
50482
|
+
console.error(`${colors.dim}Command:${colors.reset} ${command}`);
|
|
50436
50483
|
const result = await executeCommand(command);
|
|
50437
50484
|
process.exit(result.code);
|
|
50438
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)",
|
|
@@ -33230,6 +33257,15 @@ var OPENROUTER_MODELS = [
|
|
|
33230
33257
|
contextLength: 1e6,
|
|
33231
33258
|
cost: "premium"
|
|
33232
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
|
+
},
|
|
33233
33269
|
{
|
|
33234
33270
|
id: "anthropic/claude-fable-5",
|
|
33235
33271
|
name: "Claude Fable 5",
|
|
@@ -33243,10 +33279,13 @@ var OPENROUTER_MODELS = [
|
|
|
33243
33279
|
var VERCEL_AI_GATEWAY_MODELS = [
|
|
33244
33280
|
...OPENROUTER_MODELS.filter((model) => [
|
|
33245
33281
|
"openai/gpt-5.6-luna",
|
|
33282
|
+
"openai/gpt-6-astra",
|
|
33283
|
+
"deepseek/deepseek-v4.1-flash",
|
|
33246
33284
|
"openai/gpt-5.6-terra",
|
|
33247
33285
|
"openai/gpt-5.6-sol",
|
|
33248
33286
|
"anthropic/claude-sonnet-5",
|
|
33249
33287
|
"anthropic/claude-opus-5",
|
|
33288
|
+
"anthropic/claude-fable-5.1",
|
|
33250
33289
|
"anthropic/claude-fable-5"
|
|
33251
33290
|
].includes(model.id)).map((model) => ({ ...model, provider: "vercel-ai-gateway" })),
|
|
33252
33291
|
{
|
|
@@ -33305,7 +33344,7 @@ var CLOUDFLARE_AI_GATEWAY_MODELS = [
|
|
|
33305
33344
|
contextLength: 32000,
|
|
33306
33345
|
cost: "lower-cost"
|
|
33307
33346
|
},
|
|
33308
|
-
...VERCEL_AI_GATEWAY_MODELS.map((model) => ({
|
|
33347
|
+
...VERCEL_AI_GATEWAY_MODELS.filter((model) => model.id !== "deepseek/deepseek-v4.1-flash").map((model) => ({
|
|
33309
33348
|
...model,
|
|
33310
33349
|
id: model.id.startsWith("anthropic/") ? model.id.replaceAll(".", "-") : model.id,
|
|
33311
33350
|
provider: "cloudflare-ai-gateway"
|
|
@@ -33495,6 +33534,7 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33495
33534
|
},
|
|
33496
33535
|
...[
|
|
33497
33536
|
["gpt-5.6-luna", "GPT 5.6 Luna", "fast", "lower-cost"],
|
|
33537
|
+
["gpt-6-astra", "GPT 6 Astra", "reasoning", "premium"],
|
|
33498
33538
|
["gpt-5.6-terra", "GPT 5.6 Terra", "smart", "premium"],
|
|
33499
33539
|
["gpt-5.6-sol", "GPT 5.6 Sol", "reasoning", "premium"]
|
|
33500
33540
|
].map(([id, name, category, cost]) => ({
|
|
@@ -33527,6 +33567,16 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
33527
33567
|
contextLength: 1e6,
|
|
33528
33568
|
cost: "premium"
|
|
33529
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
|
+
},
|
|
33530
33580
|
{
|
|
33531
33581
|
id: "claude-fable-5",
|
|
33532
33582
|
name: "Claude Fable 5",
|
|
@@ -33580,6 +33630,22 @@ function getProviderDisplayName(provider) {
|
|
|
33580
33630
|
return "Custom";
|
|
33581
33631
|
}
|
|
33582
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
|
+
}
|
|
33583
33649
|
var COST_TIER_ORDER = { free: 0, "lower-cost": 1, premium: 2 };
|
|
33584
33650
|
var CATEGORY_ORDER = { fast: 0, smart: 1, reasoning: 2 };
|
|
33585
33651
|
function sortModelsByCost(models) {
|
|
@@ -81260,7 +81326,7 @@ function getThinkingLevel(config2) {
|
|
|
81260
81326
|
return config2?.thinkingLevel || "low";
|
|
81261
81327
|
}
|
|
81262
81328
|
function supportsThinkingControl(modelId) {
|
|
81263
|
-
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-");
|
|
81264
81330
|
}
|
|
81265
81331
|
function buildOpenRouterThinkingOptions(modelId, thinkingLevel) {
|
|
81266
81332
|
if (thinkingLevel === "off" || !supportsThinkingControl(modelId)) {
|
|
@@ -81339,6 +81405,8 @@ function buildAiSdkProviderOptions(modelId, thinkingLevel, providerOptionsName)
|
|
|
81339
81405
|
return;
|
|
81340
81406
|
}
|
|
81341
81407
|
function shouldOmitTemperature(modelId, thinkingLevel) {
|
|
81408
|
+
if (modelId.includes("gpt-6"))
|
|
81409
|
+
return true;
|
|
81342
81410
|
return thinkingLevel !== "off" && (modelId.startsWith("claude-") || modelId.includes("gpt-5"));
|
|
81343
81411
|
}
|
|
81344
81412
|
async function callOpenRouter(apiKey, modelId, systemPrompt, userInput, thinkingLevel) {
|
|
@@ -82031,22 +82099,6 @@ var statusBarText;
|
|
|
82031
82099
|
var chatScrollBox;
|
|
82032
82100
|
var inputField;
|
|
82033
82101
|
var inputContainer;
|
|
82034
|
-
function getApiKeyUrl(provider) {
|
|
82035
|
-
switch (provider) {
|
|
82036
|
-
case "opencode-zen":
|
|
82037
|
-
return "https://opencode.ai/auth";
|
|
82038
|
-
case "openrouter":
|
|
82039
|
-
return "https://openrouter.ai/keys";
|
|
82040
|
-
case "vercel-ai-gateway":
|
|
82041
|
-
return "https://vercel.com/docs/ai-gateway";
|
|
82042
|
-
case "cloudflare-ai-gateway":
|
|
82043
|
-
return "https://developers.cloudflare.com/ai-gateway/";
|
|
82044
|
-
case "workers-ai":
|
|
82045
|
-
return "https://dash.cloudflare.com/profile/api-tokens";
|
|
82046
|
-
case "custom":
|
|
82047
|
-
return "";
|
|
82048
|
-
}
|
|
82049
|
-
}
|
|
82050
82102
|
var inputHintText;
|
|
82051
82103
|
var helpBarText;
|
|
82052
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",
|