claudish 7.18.1 → 7.19.0
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 +38 -5
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -651,7 +651,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
651
651
|
});
|
|
652
652
|
|
|
653
653
|
// src/version.ts
|
|
654
|
-
var VERSION = "7.
|
|
654
|
+
var VERSION = "7.19.0";
|
|
655
655
|
|
|
656
656
|
// src/logger.ts
|
|
657
657
|
var exports_logger = {};
|
|
@@ -27650,6 +27650,9 @@ function loadConfig() {
|
|
|
27650
27650
|
if (config2.onepasswordEnvironments !== undefined) {
|
|
27651
27651
|
merged.onepasswordEnvironments = config2.onepasswordEnvironments;
|
|
27652
27652
|
}
|
|
27653
|
+
if (config2.anthropicApiBilling !== undefined) {
|
|
27654
|
+
merged.anthropicApiBilling = config2.anthropicApiBilling;
|
|
27655
|
+
}
|
|
27653
27656
|
if (config2.localProviders !== undefined) {
|
|
27654
27657
|
merged.localProviders = Array.from(new Set(config2.localProviders)).sort();
|
|
27655
27658
|
}
|
|
@@ -58386,7 +58389,8 @@ var init_config = __esm(() => {
|
|
|
58386
58389
|
OPENAI_BASE_URL: "OPENAI_BASE_URL",
|
|
58387
58390
|
CLAUDISH_SUMMARIZE_TOOLS: "CLAUDISH_SUMMARIZE_TOOLS",
|
|
58388
58391
|
CLAUDISH_DIAG_MODE: "CLAUDISH_DIAG_MODE",
|
|
58389
|
-
CLAUDISH_DEBUG: "CLAUDISH_DEBUG"
|
|
58392
|
+
CLAUDISH_DEBUG: "CLAUDISH_DEBUG",
|
|
58393
|
+
CLAUDISH_ANTHROPIC_API_BILLING: "CLAUDISH_ANTHROPIC_API_BILLING"
|
|
58390
58394
|
};
|
|
58391
58395
|
OPENROUTER_HEADERS = {
|
|
58392
58396
|
"HTTP-Referer": "https://claudish.com",
|
|
@@ -62343,6 +62347,8 @@ async function parseArgs(args) {
|
|
|
62343
62347
|
process.exit(1);
|
|
62344
62348
|
}
|
|
62345
62349
|
config3.defaultProvider = dpArg;
|
|
62350
|
+
} else if (arg === "--anthropic-api-billing") {
|
|
62351
|
+
config3.anthropicApiBilling = true;
|
|
62346
62352
|
} else if (arg === "--op-env" || arg.startsWith("--op-env=")) {
|
|
62347
62353
|
const v = arg.startsWith("--op-env=") ? arg.slice("--op-env=".length) : args[++i];
|
|
62348
62354
|
if (!v) {
|
|
@@ -63392,6 +63398,10 @@ ${h("OPTIONS")}
|
|
|
63392
63398
|
${green("--profile")} ${yellow("<name>")} Use named profile for model mapping (default profile if omitted)
|
|
63393
63399
|
${green("--default-provider")} ${yellow("<name>")} Fallback provider for bare model names (builtin or customEndpoints key)
|
|
63394
63400
|
${dim("Precedence: this flag > CLAUDISH_DEFAULT_PROVIDER env > config.json")}
|
|
63401
|
+
${green("--anthropic-api-billing")} Use your real ANTHROPIC_API_KEY for native Claude models
|
|
63402
|
+
${dim("(metered API billing). Default: the key is hidden so Claude Code")}
|
|
63403
|
+
${dim("uses your claude.ai subscription. Env: CLAUDISH_ANTHROPIC_API_BILLING")}
|
|
63404
|
+
${dim("Config: anthropicApiBilling: true")}
|
|
63395
63405
|
${green("--config")} ${yellow("<file>")} Use THIS config file for the run, fully replacing the machine
|
|
63396
63406
|
${dim("global (~/.claudish/config.json) AND project (.claudish.json).")}
|
|
63397
63407
|
${dim("A file naming no op:// source never touches 1Password (no prompt).")}
|
|
@@ -63567,6 +63577,7 @@ ${h("ENVIRONMENT VARIABLES")}
|
|
|
63567
63577
|
${blue("CLAUDISH_CONTEXT_WINDOW")} Override context window size
|
|
63568
63578
|
${blue("CLAUDISH_DIAG_MODE")} Diagnostic output: auto / logfile / off
|
|
63569
63579
|
${blue("CLAUDISH_DEBUG")} Always enable debug logging: 1 / true ${dim("(same as -d)")}
|
|
63580
|
+
${blue("CLAUDISH_ANTHROPIC_API_BILLING")} Bill native Claude to your API key ${dim("(see --anthropic-api-billing)")}
|
|
63570
63581
|
${blue("CLAUDISH_MCP_TOOLS")} MCP tool gating: all / low-level / agentic / channel
|
|
63571
63582
|
${blue("CLAUDISH_MODEL_OPUS")} Override model for Opus role
|
|
63572
63583
|
${blue("CLAUDISH_MODEL_SONNET")} Override model for Sonnet role
|
|
@@ -71167,6 +71178,18 @@ function hasNativeAnthropicMapping(config3) {
|
|
|
71167
71178
|
];
|
|
71168
71179
|
return models.some((m) => m && parseModelSpec(m).provider === "native-anthropic");
|
|
71169
71180
|
}
|
|
71181
|
+
function wantsAnthropicApiBilling(config3) {
|
|
71182
|
+
if (config3.anthropicApiBilling)
|
|
71183
|
+
return true;
|
|
71184
|
+
const raw2 = process.env[ENV.CLAUDISH_ANTHROPIC_API_BILLING];
|
|
71185
|
+
if (raw2 !== undefined && raw2 !== "" && raw2 !== "0" && raw2.toLowerCase() !== "false")
|
|
71186
|
+
return true;
|
|
71187
|
+
try {
|
|
71188
|
+
return loadConfig().anthropicApiBilling === true;
|
|
71189
|
+
} catch {
|
|
71190
|
+
return false;
|
|
71191
|
+
}
|
|
71192
|
+
}
|
|
71170
71193
|
function isProxyAuthMode(config3) {
|
|
71171
71194
|
return !config3.monitor && !hasNativeAnthropicMapping(config3);
|
|
71172
71195
|
}
|
|
@@ -71430,6 +71453,7 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
|
|
|
71430
71453
|
[ENV.CLAUDISH_ACTIVE_MODEL_NAME]: modelDisplayName,
|
|
71431
71454
|
CLAUDISH_IS_LOCAL: isLocalModel2 ? "true" : "false"
|
|
71432
71455
|
};
|
|
71456
|
+
let hidAnthropicApiKey = false;
|
|
71433
71457
|
delete env.CLAUDECODE;
|
|
71434
71458
|
if (config3.monitor) {
|
|
71435
71459
|
delete env.ANTHROPIC_API_KEY;
|
|
@@ -71443,9 +71467,14 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
|
|
|
71443
71467
|
env[ENV.ANTHROPIC_MODEL] = modelId;
|
|
71444
71468
|
env[ENV.ANTHROPIC_SMALL_FAST_MODEL] = modelId;
|
|
71445
71469
|
}
|
|
71446
|
-
if (hasNativeAnthropicMapping(config3)) {
|
|
71447
|
-
|
|
71448
|
-
|
|
71470
|
+
if (hasNativeAnthropicMapping(config3)) {
|
|
71471
|
+
if (process.env.ANTHROPIC_API_KEY && !wantsAnthropicApiBilling(config3)) {
|
|
71472
|
+
delete env.ANTHROPIC_API_KEY;
|
|
71473
|
+
hidAnthropicApiKey = true;
|
|
71474
|
+
}
|
|
71475
|
+
} else {
|
|
71476
|
+
env.ANTHROPIC_API_KEY = "sk-ant-api03-placeholder-not-used-proxy-handles-auth-with-openrouter-key-xxxxxxxxxxxxxxxxxxxxx";
|
|
71477
|
+
env.ANTHROPIC_AUTH_TOKEN = "placeholder-token-not-used-proxy-handles-auth";
|
|
71449
71478
|
if (!process.env[ENV.CLAUDE_CODE_AUTO_COMPACT_WINDOW]) {
|
|
71450
71479
|
const autoCompactWindow = await computeMainThreadContextWindow(config3);
|
|
71451
71480
|
if (autoCompactWindow > 0) {
|
|
@@ -71468,6 +71497,9 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
|
|
|
71468
71497
|
};
|
|
71469
71498
|
if (!config3.monitor && hasNativeAnthropicMapping(config3)) {
|
|
71470
71499
|
log2("[claudish] Native Claude model detected \u2014 using Claude Code subscription credentials");
|
|
71500
|
+
if (hidAnthropicApiKey) {
|
|
71501
|
+
log2("[claudish] ANTHROPIC_API_KEY found but hidden so it can't override that subscription \xB7 " + "use --anthropic-api-billing (or anthropicApiBilling: true) to bill the API instead");
|
|
71502
|
+
}
|
|
71471
71503
|
}
|
|
71472
71504
|
if (config3.interactive) {
|
|
71473
71505
|
log2(`
|
|
@@ -71639,6 +71671,7 @@ var init_claude_runner = __esm(() => {
|
|
|
71639
71671
|
init_model_catalog();
|
|
71640
71672
|
init_config();
|
|
71641
71673
|
init_logger();
|
|
71674
|
+
init_profile_config();
|
|
71642
71675
|
init_model_parser();
|
|
71643
71676
|
init_routing_rules();
|
|
71644
71677
|
init_telemetry();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.19.0",
|
|
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",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"ai"
|
|
61
61
|
],
|
|
62
62
|
"optionalDependencies": {
|
|
63
|
-
"@claudish/magmux-darwin-arm64": "7.
|
|
64
|
-
"@claudish/magmux-darwin-x64": "7.
|
|
65
|
-
"@claudish/magmux-linux-arm64": "7.
|
|
66
|
-
"@claudish/magmux-linux-x64": "7.
|
|
63
|
+
"@claudish/magmux-darwin-arm64": "7.19.0",
|
|
64
|
+
"@claudish/magmux-darwin-x64": "7.19.0",
|
|
65
|
+
"@claudish/magmux-linux-arm64": "7.19.0",
|
|
66
|
+
"@claudish/magmux-linux-x64": "7.19.0"
|
|
67
67
|
},
|
|
68
68
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
69
69
|
"license": "MIT",
|