claudish 7.12.2 → 7.12.4
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 +44 -9
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -581,7 +581,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
581
581
|
});
|
|
582
582
|
|
|
583
583
|
// src/version.ts
|
|
584
|
-
var VERSION = "7.12.
|
|
584
|
+
var VERSION = "7.12.4";
|
|
585
585
|
|
|
586
586
|
// src/logger.ts
|
|
587
587
|
var exports_logger = {};
|
|
@@ -31403,10 +31403,15 @@ var init_codex_api_format = __esm(() => {
|
|
|
31403
31403
|
return value;
|
|
31404
31404
|
}
|
|
31405
31405
|
acceptsXhigh() {
|
|
31406
|
-
|
|
31406
|
+
const m = this.modelId.toLowerCase();
|
|
31407
|
+
return /codex.*max/.test(m) || /gpt-5\.6/.test(m);
|
|
31408
|
+
}
|
|
31409
|
+
acceptsMax() {
|
|
31410
|
+
return /gpt-5\.6/.test(this.modelId.toLowerCase());
|
|
31407
31411
|
}
|
|
31408
31412
|
isCodex51Plus() {
|
|
31409
|
-
|
|
31413
|
+
const m = this.modelId.toLowerCase();
|
|
31414
|
+
return /gpt-5\.[1-9].*codex/.test(m) || /gpt-5\.6/.test(m);
|
|
31410
31415
|
}
|
|
31411
31416
|
clampCodexEffort(level) {
|
|
31412
31417
|
switch (level) {
|
|
@@ -31421,6 +31426,8 @@ var init_codex_api_format = __esm(() => {
|
|
|
31421
31426
|
case "xhigh":
|
|
31422
31427
|
return this.acceptsXhigh() ? "xhigh" : "high";
|
|
31423
31428
|
case "max":
|
|
31429
|
+
if (this.acceptsMax())
|
|
31430
|
+
return "max";
|
|
31424
31431
|
return this.acceptsXhigh() ? "xhigh" : "high";
|
|
31425
31432
|
default:
|
|
31426
31433
|
return "medium";
|
|
@@ -41858,6 +41865,9 @@ var init_vertex_oauth = __esm(() => {
|
|
|
41858
41865
|
});
|
|
41859
41866
|
|
|
41860
41867
|
// src/providers/provider-profiles.ts
|
|
41868
|
+
function requiresResponsesApi(modelName) {
|
|
41869
|
+
return /^gpt-5\.6/.test(modelName.toLowerCase());
|
|
41870
|
+
}
|
|
41861
41871
|
function createHandlerForProvider(ctx) {
|
|
41862
41872
|
const profile = PROVIDER_PROFILES[ctx.provider.name] ?? getRuntimeProfiles().get(ctx.provider.name);
|
|
41863
41873
|
if (!profile) {
|
|
@@ -41920,6 +41930,18 @@ var init_provider_profiles = __esm(() => {
|
|
|
41920
41930
|
};
|
|
41921
41931
|
openaiProfile = {
|
|
41922
41932
|
createHandler(ctx) {
|
|
41933
|
+
if (requiresResponsesApi(ctx.modelName)) {
|
|
41934
|
+
const responsesProvider = { ...ctx.provider, apiPath: "/v1/responses" };
|
|
41935
|
+
const transport2 = new OpenAIProviderTransport(responsesProvider, ctx.modelName, ctx.apiKey);
|
|
41936
|
+
const adapter2 = new CodexAPIFormat(ctx.modelName);
|
|
41937
|
+
const handler2 = new ComposedHandler(transport2, ctx.targetModel, ctx.modelName, ctx.port, {
|
|
41938
|
+
adapter: adapter2,
|
|
41939
|
+
tokenStrategy: "delta-aware",
|
|
41940
|
+
...ctx.sharedOpts
|
|
41941
|
+
});
|
|
41942
|
+
log(`[Proxy] Created OpenAI handler (Responses API composed): ${ctx.modelName}`);
|
|
41943
|
+
return handler2;
|
|
41944
|
+
}
|
|
41923
41945
|
const transport = new OpenAIProviderTransport(ctx.provider, ctx.modelName, ctx.apiKey);
|
|
41924
41946
|
const adapter = new OpenAIAPIFormat(ctx.modelName);
|
|
41925
41947
|
const handler = new ComposedHandler(transport, ctx.targetModel, ctx.modelName, ctx.port, {
|
|
@@ -43955,6 +43977,7 @@ ${plan.hint}` : `[Route] ${plan.reason}`;
|
|
|
43955
43977
|
app.post("/v1/messages", async (c) => {
|
|
43956
43978
|
try {
|
|
43957
43979
|
const body = await c.req.json();
|
|
43980
|
+
log(`[RequestMeta] model=${body.model} output_config=${JSON.stringify(body.output_config) ?? "(none)"} metadata=${JSON.stringify(body.metadata) ?? "(none)"} anthropic-beta=${c.req.header("anthropic-beta") ?? "(none)"}`);
|
|
43958
43981
|
const handler = await getHandlerForRequest(body.model);
|
|
43959
43982
|
return handler.handle(c, body);
|
|
43960
43983
|
} catch (e) {
|
|
@@ -62351,6 +62374,7 @@ async function parseArgs(args) {
|
|
|
62351
62374
|
config3.quiet = true;
|
|
62352
62375
|
} else if (arg === "--verbose" || arg === "-v") {
|
|
62353
62376
|
config3.quiet = false;
|
|
62377
|
+
config3._sawVerbose = true;
|
|
62354
62378
|
} else if (arg === "--json") {
|
|
62355
62379
|
config3.jsonOutput = true;
|
|
62356
62380
|
} else if (arg === "--monitor") {
|
|
@@ -62549,6 +62573,9 @@ Usage: claudish --models --provider <slug>`);
|
|
|
62549
62573
|
if (!config3._hasPositionalPrompt && !config3.stdin && !config3._hasPrintFlag) {
|
|
62550
62574
|
config3.interactive = true;
|
|
62551
62575
|
}
|
|
62576
|
+
if (config3._sawVerbose && !config3.interactive && !config3.claudeArgs.includes("--verbose") && !config3.claudeArgs.includes("-v")) {
|
|
62577
|
+
config3.claudeArgs.push("--verbose");
|
|
62578
|
+
}
|
|
62552
62579
|
if (config3.monitor) {
|
|
62553
62580
|
if (process.env.ANTHROPIC_API_KEY?.includes("placeholder")) {
|
|
62554
62581
|
delete process.env.ANTHROPIC_API_KEY;
|
|
@@ -71308,7 +71335,9 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
|
|
|
71308
71335
|
}
|
|
71309
71336
|
claudeArgs.push(...config3.claudeArgs);
|
|
71310
71337
|
} else {
|
|
71311
|
-
claudeArgs.
|
|
71338
|
+
if (!config3.claudeArgs.includes("-p") && !config3.claudeArgs.includes("--print")) {
|
|
71339
|
+
claudeArgs.push("-p");
|
|
71340
|
+
}
|
|
71312
71341
|
if (config3.autoApprove) {
|
|
71313
71342
|
claudeArgs.push("--dangerously-skip-permissions");
|
|
71314
71343
|
}
|
|
@@ -71348,7 +71377,11 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
|
|
|
71348
71377
|
}
|
|
71349
71378
|
const log2 = (message) => {
|
|
71350
71379
|
if (!config3.quiet) {
|
|
71351
|
-
|
|
71380
|
+
if (config3.interactive) {
|
|
71381
|
+
console.log(message);
|
|
71382
|
+
} else {
|
|
71383
|
+
console.error(message);
|
|
71384
|
+
}
|
|
71352
71385
|
}
|
|
71353
71386
|
};
|
|
71354
71387
|
if (!config3.monitor && hasNativeAnthropicMapping(config3)) {
|
|
@@ -71425,7 +71458,7 @@ function setupSignalHandlers(proc, tempSettingsPath, quiet, onCleanup) {
|
|
|
71425
71458
|
for (const signal of signals2) {
|
|
71426
71459
|
process.on(signal, () => {
|
|
71427
71460
|
if (!quiet) {
|
|
71428
|
-
console.
|
|
71461
|
+
console.error(`
|
|
71429
71462
|
[claudish] Received ${signal}, shutting down...`);
|
|
71430
71463
|
}
|
|
71431
71464
|
proc.kill();
|
|
@@ -72313,7 +72346,7 @@ Team Status`);
|
|
|
72313
72346
|
}
|
|
72314
72347
|
const rawArgs = process.argv.slice(2);
|
|
72315
72348
|
const explicitNoAutoApprove = rawArgs.includes("--no-auto-approve");
|
|
72316
|
-
if (cliConfig.autoApprove && !explicitNoAutoApprove && !cliConfig.stdin) {
|
|
72349
|
+
if (cliConfig.autoApprove && !explicitNoAutoApprove && !cliConfig.stdin && cliConfig.interactive) {
|
|
72317
72350
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_profile_config(), exports_profile_config));
|
|
72318
72351
|
try {
|
|
72319
72352
|
const cfg = loadConfig2();
|
|
@@ -72480,13 +72513,15 @@ Team Status`);
|
|
|
72480
72513
|
setDiagOutput2(null);
|
|
72481
72514
|
diag.cleanup();
|
|
72482
72515
|
if (!cliConfig.quiet) {
|
|
72483
|
-
console.log
|
|
72516
|
+
const write = cliConfig.interactive ? console.log : console.error;
|
|
72517
|
+
write(`
|
|
72484
72518
|
[claudish] Shutting down proxy server...`);
|
|
72485
72519
|
}
|
|
72486
72520
|
await proxy.shutdown();
|
|
72487
72521
|
}
|
|
72488
72522
|
if (!cliConfig.quiet) {
|
|
72489
|
-
console.log
|
|
72523
|
+
const write = cliConfig.interactive ? console.log : console.error;
|
|
72524
|
+
write(`[claudish] Done
|
|
72490
72525
|
`);
|
|
72491
72526
|
}
|
|
72492
72527
|
const sessionLogPath = getAlwaysOnLogPath2();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.4",
|
|
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.12.
|
|
64
|
-
"@claudish/magmux-darwin-x64": "7.12.
|
|
65
|
-
"@claudish/magmux-linux-arm64": "7.12.
|
|
66
|
-
"@claudish/magmux-linux-x64": "7.12.
|
|
63
|
+
"@claudish/magmux-darwin-arm64": "7.12.4",
|
|
64
|
+
"@claudish/magmux-darwin-x64": "7.12.4",
|
|
65
|
+
"@claudish/magmux-linux-arm64": "7.12.4",
|
|
66
|
+
"@claudish/magmux-linux-x64": "7.12.4"
|
|
67
67
|
},
|
|
68
68
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
69
69
|
"license": "MIT",
|