claudish 13.0.2 → 13.0.3
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 +24 -22
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -575,7 +575,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
575
575
|
});
|
|
576
576
|
|
|
577
577
|
// src/version.ts
|
|
578
|
-
var VERSION = "13.0.
|
|
578
|
+
var VERSION = "13.0.3";
|
|
579
579
|
|
|
580
580
|
// src/logger.ts
|
|
581
581
|
import { appendFile, existsSync as existsSync2, mkdirSync, readdirSync, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -27780,7 +27780,8 @@ async function discoverEveryServedModel(providerName) {
|
|
|
27780
27780
|
detail: `no base URL resolved \u2014 check ${overrides || "the provider's baseUrl"}`
|
|
27781
27781
|
});
|
|
27782
27782
|
}
|
|
27783
|
-
const
|
|
27783
|
+
const definitionEndpoint = `${baseUrl}${descriptor.path}`;
|
|
27784
|
+
let endpoint = registryModelsEndpoint(providerName, def) ?? definitionEndpoint;
|
|
27784
27785
|
let headers = {};
|
|
27785
27786
|
if (def.isLocal) {
|
|
27786
27787
|
const key = def.apiKeyEnvVar ? process.env[def.apiKeyEnvVar] : undefined;
|
|
@@ -27807,13 +27808,14 @@ async function discoverEveryServedModel(providerName) {
|
|
|
27807
27808
|
...def.headers ?? {},
|
|
27808
27809
|
...headers
|
|
27809
27810
|
};
|
|
27811
|
+
const fetchList = (url) => fetch(url, { method: "GET", headers, signal: AbortSignal.timeout(FETCH_TIMEOUT_MS3) });
|
|
27810
27812
|
let response;
|
|
27811
27813
|
try {
|
|
27812
|
-
response = await
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
}
|
|
27814
|
+
response = await fetchList(endpoint);
|
|
27815
|
+
if (response.status === 404 && endpoint !== definitionEndpoint) {
|
|
27816
|
+
endpoint = definitionEndpoint;
|
|
27817
|
+
response = await fetchList(endpoint);
|
|
27818
|
+
}
|
|
27817
27819
|
} catch (e) {
|
|
27818
27820
|
return recordFailure({
|
|
27819
27821
|
kind: "unreachable",
|
|
@@ -27854,7 +27856,7 @@ async function discoverEveryServedModel(providerName) {
|
|
|
27854
27856
|
}
|
|
27855
27857
|
const models = parsed.models;
|
|
27856
27858
|
_failures.delete(providerName);
|
|
27857
|
-
log(`[model-discovery:${providerName}] discovered ${models.length} models: ` + models.map((m) => `${m.id}(${m.contextWindow ?? "?"})`).join(", "));
|
|
27859
|
+
log(`[model-discovery:${providerName}] discovered ${models.length} models from ${endpoint}: ` + models.map((m) => `${m.id}(${m.contextWindow ?? "?"})`).join(", "));
|
|
27858
27860
|
_cache2.set(providerName, { models, expiresAt: Date.now() + CACHE_TTL_MS2 });
|
|
27859
27861
|
return { kind: "served", models };
|
|
27860
27862
|
}
|
|
@@ -36448,8 +36450,8 @@ var init_provider_definitions = __esm(() => {
|
|
|
36448
36450
|
baseUrl: "https://api.kimi.com/coding/v1",
|
|
36449
36451
|
apiPath: "/messages",
|
|
36450
36452
|
apiKeyEnvVar: "KIMI_CODING_API_KEY",
|
|
36451
|
-
apiKeyDescription: "Kimi Coding API Key",
|
|
36452
|
-
apiKeyUrl: "https://kimi.com/code
|
|
36453
|
+
apiKeyDescription: "Kimi Coding API Key (membership page, or run: claudish login kimi)",
|
|
36454
|
+
apiKeyUrl: "https://www.kimi.com/code",
|
|
36453
36455
|
oauthFallback: "kimi-oauth.json",
|
|
36454
36456
|
oauthLoginSlug: "kimi",
|
|
36455
36457
|
shortcuts: ["kc"],
|
|
@@ -36502,7 +36504,7 @@ var init_provider_definitions = __esm(() => {
|
|
|
36502
36504
|
apiKeyEnvVar: "ZHIPU_API_KEY",
|
|
36503
36505
|
apiKeyAliases: ["GLM_API_KEY"],
|
|
36504
36506
|
apiKeyDescription: "GLM/Zhipu API Key",
|
|
36505
|
-
apiKeyUrl: "https://z.ai/",
|
|
36507
|
+
apiKeyUrl: "https://z.ai/manage-apikey/apikey-list",
|
|
36506
36508
|
shortcuts: ["glm", "zhipu"],
|
|
36507
36509
|
shortestPrefix: "glm",
|
|
36508
36510
|
legacyPrefixes: [
|
|
@@ -36548,7 +36550,7 @@ var init_provider_definitions = __esm(() => {
|
|
|
36548
36550
|
apiPath: "/api/anthropic/v1/messages",
|
|
36549
36551
|
apiKeyEnvVar: "ZAI_API_KEY",
|
|
36550
36552
|
apiKeyDescription: "Z.AI API Key",
|
|
36551
|
-
apiKeyUrl: "https://z.ai/",
|
|
36553
|
+
apiKeyUrl: "https://z.ai/manage-apikey/apikey-list",
|
|
36552
36554
|
shortcuts: ["z-ai", "zai"],
|
|
36553
36555
|
shortestPrefix: "z-ai",
|
|
36554
36556
|
legacyPrefixes: [{ prefix: "zai/", stripPrefix: true }],
|
|
@@ -36568,7 +36570,7 @@ var init_provider_definitions = __esm(() => {
|
|
|
36568
36570
|
apiPath: "/api/chat",
|
|
36569
36571
|
apiKeyEnvVar: "OLLAMA_API_KEY",
|
|
36570
36572
|
apiKeyDescription: "OllamaCloud API Key",
|
|
36571
|
-
apiKeyUrl: "https://ollama.com/
|
|
36573
|
+
apiKeyUrl: "https://ollama.com/settings/keys",
|
|
36572
36574
|
shortcuts: ["oc", "llama", "lc"],
|
|
36573
36575
|
shortestPrefix: "oc",
|
|
36574
36576
|
legacyPrefixes: [{ prefix: "oc/", stripPrefix: true }],
|
|
@@ -36592,8 +36594,8 @@ var init_provider_definitions = __esm(() => {
|
|
|
36592
36594
|
baseUrlEnvVars: ["OPENCODE_BASE_URL"],
|
|
36593
36595
|
apiPath: "/v1/chat/completions",
|
|
36594
36596
|
apiKeyEnvVar: "OPENCODE_API_KEY",
|
|
36595
|
-
apiKeyDescription: "OpenCode Zen API Key",
|
|
36596
|
-
apiKeyUrl: "https://opencode.ai/",
|
|
36597
|
+
apiKeyDescription: "OpenCode Zen API Key (Console > Settings > Service accounts)",
|
|
36598
|
+
apiKeyUrl: "https://opencode.ai/console",
|
|
36597
36599
|
shortcuts: ["zen"],
|
|
36598
36600
|
shortestPrefix: "zen",
|
|
36599
36601
|
legacyPrefixes: [{ prefix: "zen/", stripPrefix: true }],
|
|
@@ -36613,8 +36615,8 @@ var init_provider_definitions = __esm(() => {
|
|
|
36613
36615
|
modelDiscovery: { path: "/v1/models", format: "openai-models-list" },
|
|
36614
36616
|
apiKeyEnvVar: "OPENCODE_GO_API_KEY",
|
|
36615
36617
|
siblingKeyEnvVars: ["OPENCODE_API_KEY"],
|
|
36616
|
-
apiKeyDescription: "OpenCode Zen Go (Lite Plan) API Key",
|
|
36617
|
-
apiKeyUrl: "https://opencode.ai/",
|
|
36618
|
+
apiKeyDescription: "OpenCode Zen Go (Lite Plan) API Key (Console > Settings > Service accounts)",
|
|
36619
|
+
apiKeyUrl: "https://opencode.ai/console",
|
|
36618
36620
|
shortcuts: ["zengo", "zgo"],
|
|
36619
36621
|
shortestPrefix: "zengo",
|
|
36620
36622
|
legacyPrefixes: [
|
|
@@ -36718,7 +36720,7 @@ var init_provider_definitions = __esm(() => {
|
|
|
36718
36720
|
apiPath: "/v1/chat/completions",
|
|
36719
36721
|
apiKeyEnvVar: "LMSTUDIO_API_KEY",
|
|
36720
36722
|
apiKeyDescription: "LM Studio API Key (optional \u2014 leave blank for localhost)",
|
|
36721
|
-
apiKeyUrl: "https://lmstudio.ai/docs/
|
|
36723
|
+
apiKeyUrl: "https://lmstudio.ai/docs/developer/core/server",
|
|
36722
36724
|
shortcuts: ["lms", "lmstudio", "mlstudio"],
|
|
36723
36725
|
shortestPrefix: "lms",
|
|
36724
36726
|
legacyPrefixes: [
|
|
@@ -84998,13 +85000,13 @@ function ProviderDetail({
|
|
|
84998
85000
|
fg: C.blue,
|
|
84999
85001
|
attributes: A.bold,
|
|
85000
85002
|
children: [
|
|
85001
|
-
"
|
|
85003
|
+
"API:",
|
|
85002
85004
|
" "
|
|
85003
85005
|
]
|
|
85004
85006
|
}),
|
|
85005
85007
|
/* @__PURE__ */ jsx22("span", {
|
|
85006
85008
|
fg: C.cyan,
|
|
85007
|
-
children: activeEndpoint || selectedProvider.defaultEndpoint || "default"
|
|
85009
|
+
children: (activeEndpoint || selectedProvider.defaultEndpoint || "default").replace(/^https?:\/\//, "")
|
|
85008
85010
|
})
|
|
85009
85011
|
]
|
|
85010
85012
|
}),
|
|
@@ -91109,7 +91111,7 @@ function resolveContextWindowEnv(realWindow, processEnv = process.env) {
|
|
|
91109
91111
|
if (processEnv[ENV.CLAUDE_CODE_AUTO_COMPACT_WINDOW])
|
|
91110
91112
|
return { vars };
|
|
91111
91113
|
if (realWindow >= MIN_AUTO_COMPACT_WINDOW) {
|
|
91112
|
-
vars[ENV.CLAUDE_CODE_AUTO_COMPACT_WINDOW] = String(realWindow);
|
|
91114
|
+
vars[ENV.CLAUDE_CODE_AUTO_COMPACT_WINDOW] = String(Math.min(realWindow, MAX_AUTO_COMPACT_WINDOW));
|
|
91113
91115
|
return {
|
|
91114
91116
|
vars,
|
|
91115
91117
|
notice: `[claudish] Auto-compact window: ${realWindow.toLocaleString()} tokens ` + "(Claude Code compacts before the backend's real limit)"
|
|
@@ -91616,7 +91618,7 @@ var restoreTerminal = null, macosKeychainAnthropicResult, defaultKeychainAnthrop
|
|
|
91616
91618
|
macosKeychainAnthropicResult = false;
|
|
91617
91619
|
}
|
|
91618
91620
|
return macosKeychainAnthropicResult;
|
|
91619
|
-
}, CLAUDISH_PLACEHOLDER_API_KEY = "sk-ant-api03-placeholder-not-used-proxy-handles-auth-with-openrouter-key-xxxxxxxxxxxxxxxxxxxxx", CLAUDISH_PLACEHOLDER_AUTH_TOKEN = "placeholder-token-not-used-proxy-handles-auth", STALE_TOKEN_FILE_MS, MAX_TOKEN_FILES_SCANNED = 4000, CLAUDE_CODE_DEFAULT_MAX_CONTEXT = 200000, USER_STATUS_LINE_TIMEOUT_SECONDS = 3, MIN_AUTO_COMPACT_WINDOW = 200000, ADVISOR_TOOL_ENV_VAR = "CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL", CLAUDISH_CHILD_ADVISOR_MODEL = "sonnet", CHILD_STDERR_NOISE, SIGNAL_EXIT_NUMBERS;
|
|
91621
|
+
}, CLAUDISH_PLACEHOLDER_API_KEY = "sk-ant-api03-placeholder-not-used-proxy-handles-auth-with-openrouter-key-xxxxxxxxxxxxxxxxxxxxx", CLAUDISH_PLACEHOLDER_AUTH_TOKEN = "placeholder-token-not-used-proxy-handles-auth", STALE_TOKEN_FILE_MS, MAX_TOKEN_FILES_SCANNED = 4000, CLAUDE_CODE_DEFAULT_MAX_CONTEXT = 200000, USER_STATUS_LINE_TIMEOUT_SECONDS = 3, MIN_AUTO_COMPACT_WINDOW = 200000, MAX_AUTO_COMPACT_WINDOW = 1e6, ADVISOR_TOOL_ENV_VAR = "CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL", CLAUDISH_CHILD_ADVISOR_MODEL = "sonnet", CHILD_STDERR_NOISE, SIGNAL_EXIT_NUMBERS;
|
|
91620
91622
|
var init_claude_runner = __esm(() => {
|
|
91621
91623
|
init_model_catalog();
|
|
91622
91624
|
init_config();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.3",
|
|
4
4
|
"description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"ai"
|
|
70
70
|
],
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@claudish/magmux-darwin-arm64": "13.0.
|
|
73
|
-
"@claudish/magmux-darwin-x64": "13.0.
|
|
74
|
-
"@claudish/magmux-linux-arm64": "13.0.
|
|
75
|
-
"@claudish/magmux-linux-x64": "13.0.
|
|
72
|
+
"@claudish/magmux-darwin-arm64": "13.0.3",
|
|
73
|
+
"@claudish/magmux-darwin-x64": "13.0.3",
|
|
74
|
+
"@claudish/magmux-linux-arm64": "13.0.3",
|
|
75
|
+
"@claudish/magmux-linux-x64": "13.0.3"
|
|
76
76
|
},
|
|
77
77
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
78
78
|
"license": "MIT",
|