claudish 1.6.0 → 1.7.1
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/index.js +32 -53
- package/package.json +1 -1
- package/scripts/extract-models.ts +5 -3
package/dist/index.js
CHANGED
|
@@ -54,59 +54,35 @@ var init_config = __esm(() => {
|
|
|
54
54
|
priority: 2,
|
|
55
55
|
provider: "MiniMax"
|
|
56
56
|
},
|
|
57
|
-
"
|
|
58
|
-
name: "
|
|
59
|
-
description: "
|
|
60
|
-
priority:
|
|
61
|
-
provider: "
|
|
57
|
+
"google/gemini-2.5-flash": {
|
|
58
|
+
name: "Advanced reasoning + vision",
|
|
59
|
+
description: "Advanced reasoning + vision",
|
|
60
|
+
priority: 6,
|
|
61
|
+
provider: "Google"
|
|
62
62
|
},
|
|
63
|
-
"openai/gpt-5
|
|
64
|
-
name: "
|
|
65
|
-
description: "
|
|
63
|
+
"openai/gpt-5": {
|
|
64
|
+
name: "Most advanced reasoning",
|
|
65
|
+
description: "Most advanced reasoning",
|
|
66
66
|
priority: 4,
|
|
67
67
|
provider: "OpenAI"
|
|
68
68
|
},
|
|
69
|
-
"
|
|
70
|
-
name: "
|
|
71
|
-
description: "
|
|
69
|
+
"openai/gpt-5.1-codex": {
|
|
70
|
+
name: "Specialized for software engineering",
|
|
71
|
+
description: "Specialized for software engineering",
|
|
72
72
|
priority: 5,
|
|
73
|
-
provider: "
|
|
74
|
-
},
|
|
75
|
-
"google/gemini-2.5-pro": {
|
|
76
|
-
name: "State-of-the-art reasoning",
|
|
77
|
-
description: "State-of-the-art reasoning",
|
|
78
|
-
priority: 6,
|
|
79
|
-
provider: "Google"
|
|
73
|
+
provider: "OpenAI"
|
|
80
74
|
},
|
|
81
75
|
"qwen/qwen3-vl-235b-a22b-instruct": {
|
|
82
|
-
name: "Multimodal
|
|
83
|
-
description: "Multimodal
|
|
76
|
+
name: "Multimodal with OCR",
|
|
77
|
+
description: "Multimodal with OCR",
|
|
84
78
|
priority: 7,
|
|
85
79
|
provider: "Alibaba"
|
|
86
80
|
},
|
|
87
|
-
"
|
|
88
|
-
name: "
|
|
89
|
-
description: "
|
|
81
|
+
"openrouter/polaris-alpha": {
|
|
82
|
+
name: "FREE experimental (logs usage)",
|
|
83
|
+
description: "FREE experimental (logs usage)",
|
|
90
84
|
priority: 8,
|
|
91
|
-
provider: "
|
|
92
|
-
},
|
|
93
|
-
"google/gemini-2.5-flash-lite": {
|
|
94
|
-
name: "Ultra-low latency",
|
|
95
|
-
description: "Ultra-low latency",
|
|
96
|
-
priority: 9,
|
|
97
|
-
provider: "Google"
|
|
98
|
-
},
|
|
99
|
-
"deepseek/deepseek-chat-v3-0324": {
|
|
100
|
-
name: "685B parameter MoE",
|
|
101
|
-
description: "685B parameter MoE",
|
|
102
|
-
priority: 10,
|
|
103
|
-
provider: "DeepSeek"
|
|
104
|
-
},
|
|
105
|
-
"openai/gpt-4o-mini": {
|
|
106
|
-
name: "Compact multimodal",
|
|
107
|
-
description: "Compact multimodal",
|
|
108
|
-
priority: 11,
|
|
109
|
-
provider: "OpenAI"
|
|
85
|
+
provider: "OpenRouter"
|
|
110
86
|
},
|
|
111
87
|
custom: {
|
|
112
88
|
name: "Custom Model",
|
|
@@ -139,15 +115,11 @@ var init_types = __esm(() => {
|
|
|
139
115
|
OPENROUTER_MODELS = [
|
|
140
116
|
"x-ai/grok-code-fast-1",
|
|
141
117
|
"minimax/minimax-m2",
|
|
142
|
-
"z-ai/glm-4.6",
|
|
143
|
-
"openai/gpt-5.1-codex",
|
|
144
118
|
"google/gemini-2.5-flash",
|
|
145
|
-
"
|
|
119
|
+
"openai/gpt-5",
|
|
120
|
+
"openai/gpt-5.1-codex",
|
|
146
121
|
"qwen/qwen3-vl-235b-a22b-instruct",
|
|
147
|
-
"
|
|
148
|
-
"google/gemini-2.5-flash-lite",
|
|
149
|
-
"deepseek/deepseek-chat-v3-0324",
|
|
150
|
-
"openai/gpt-4o-mini",
|
|
122
|
+
"openrouter/polaris-alpha",
|
|
151
123
|
"custom"
|
|
152
124
|
];
|
|
153
125
|
});
|
|
@@ -359,6 +331,13 @@ function getAvailableModels() {
|
|
|
359
331
|
}
|
|
360
332
|
|
|
361
333
|
// src/cli.ts
|
|
334
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
335
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
336
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
337
|
+
var __filename3 = fileURLToPath2(import.meta.url);
|
|
338
|
+
var __dirname3 = dirname2(__filename3);
|
|
339
|
+
var packageJson = JSON.parse(readFileSync2(join3(__dirname3, "../package.json"), "utf-8"));
|
|
340
|
+
var VERSION = packageJson.version;
|
|
362
341
|
function parseArgs(args) {
|
|
363
342
|
const config = {
|
|
364
343
|
model: undefined,
|
|
@@ -500,7 +479,7 @@ function parseArgs(args) {
|
|
|
500
479
|
return config;
|
|
501
480
|
}
|
|
502
481
|
function printVersion() {
|
|
503
|
-
console.log(
|
|
482
|
+
console.log(`claudish version ${VERSION}`);
|
|
504
483
|
}
|
|
505
484
|
function printHelp() {
|
|
506
485
|
console.log(`
|
|
@@ -764,7 +743,7 @@ async function selectModelInteractively() {
|
|
|
764
743
|
|
|
765
744
|
// src/logger.ts
|
|
766
745
|
import { writeFileSync as writeFileSync2, appendFile, existsSync as existsSync2, mkdirSync } from "fs";
|
|
767
|
-
import { join as
|
|
746
|
+
import { join as join4 } from "path";
|
|
768
747
|
var logFilePath = null;
|
|
769
748
|
var logLevel = "info";
|
|
770
749
|
var logBuffer = [];
|
|
@@ -809,12 +788,12 @@ function initLogger(debugMode, level = "info") {
|
|
|
809
788
|
return;
|
|
810
789
|
}
|
|
811
790
|
logLevel = level;
|
|
812
|
-
const logsDir =
|
|
791
|
+
const logsDir = join4(process.cwd(), "logs");
|
|
813
792
|
if (!existsSync2(logsDir)) {
|
|
814
793
|
mkdirSync(logsDir, { recursive: true });
|
|
815
794
|
}
|
|
816
795
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-").split("T").join("_").slice(0, -5);
|
|
817
|
-
logFilePath =
|
|
796
|
+
logFilePath = join4(logsDir, `claudish_${timestamp}.log`);
|
|
818
797
|
writeFileSync2(logFilePath, `Claudish Debug Log - ${new Date().toISOString()}
|
|
819
798
|
Log Level: ${level}
|
|
820
799
|
${"=".repeat(80)}
|
package/package.json
CHANGED
|
@@ -35,10 +35,10 @@ function extractModels(markdownContent: string): ExtractedModels {
|
|
|
35
35
|
const lines = quickRef.split("\n");
|
|
36
36
|
|
|
37
37
|
for (const line of lines) {
|
|
38
|
-
// Match pattern: - `model-id` - Description (may contain commas), $price/1M, contextK/M [⭐]
|
|
39
|
-
// Use non-greedy match and look for $ to find the price section
|
|
38
|
+
// Match pattern: - `model-id` - Description (may contain commas), $price/1M or FREE, contextK/M [⭐]
|
|
39
|
+
// Use non-greedy match and look for $ or FREE to find the price section
|
|
40
40
|
const match = line.match(
|
|
41
|
-
/^- `([^`]+)` - (.+?), (
|
|
41
|
+
/^- `([^`]+)` - (.+?), (?:\$[\d.]+\/1M|FREE), ([\dKM]+)(?: ⭐)?$/,
|
|
42
42
|
);
|
|
43
43
|
if (match) {
|
|
44
44
|
const [, modelId, description] = match;
|
|
@@ -52,6 +52,8 @@ function extractModels(markdownContent: string): ExtractedModels {
|
|
|
52
52
|
else if (modelId.startsWith("google/")) provider = "Google";
|
|
53
53
|
else if (modelId.startsWith("qwen/")) provider = "Alibaba";
|
|
54
54
|
else if (modelId.startsWith("deepseek/")) provider = "DeepSeek";
|
|
55
|
+
else if (modelId.startsWith("tngtech/")) provider = "TNG Tech";
|
|
56
|
+
else if (modelId.startsWith("openrouter/")) provider = "OpenRouter";
|
|
55
57
|
else if (modelId.startsWith("anthropic/")) provider = "Anthropic";
|
|
56
58
|
|
|
57
59
|
// Extract short name from description
|