claudish 4.6.0 → 4.6.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.
Files changed (2) hide show
  1. package/dist/index.js +40 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34741,7 +34741,7 @@ async function fetchGLMCodingModels2() {
34741
34741
  return [];
34742
34742
  }
34743
34743
  }
34744
- var __filename5, __dirname5, VERSION = "4.6.0", CACHE_MAX_AGE_DAYS3 = 2, MODELS_JSON_PATH, CLAUDISH_CACHE_DIR3, ALL_MODELS_JSON_PATH2;
34744
+ var __filename5, __dirname5, VERSION = "4.6.1", CACHE_MAX_AGE_DAYS3 = 2, MODELS_JSON_PATH, CLAUDISH_CACHE_DIR3, ALL_MODELS_JSON_PATH2;
34745
34745
  var init_cli = __esm(() => {
34746
34746
  init_config();
34747
34747
  init_model_loader();
@@ -65397,7 +65397,7 @@ async function createProxyServer(port, openrouterApiKey, model, monitorMode = fa
65397
65397
  const poeHandlers = new Map;
65398
65398
  const getOpenRouterHandler = (targetModel) => {
65399
65399
  const parsed = parseModelSpec(targetModel);
65400
- const modelId = parsed.provider === "openrouter" ? parsed.model : targetModel;
65400
+ const modelId = parsed.provider !== "native-anthropic" ? parsed.model : targetModel;
65401
65401
  if (!openRouterHandlers.has(modelId)) {
65402
65402
  openRouterHandlers.set(modelId, new OpenRouterHandler(modelId, openrouterApiKey, port));
65403
65403
  }
@@ -65517,7 +65517,7 @@ async function createProxyServer(port, openrouterApiKey, model, monitorMode = fa
65517
65517
  const getHandlerForRequest = (requestedModel) => {
65518
65518
  if (monitorMode)
65519
65519
  return nativeHandler;
65520
- let target = requestedModel || model;
65520
+ let target = requestedModel;
65521
65521
  const req = requestedModel.toLowerCase();
65522
65522
  if (modelMap) {
65523
65523
  if (req.includes("opus") && modelMap.opus)
@@ -65526,6 +65526,10 @@ async function createProxyServer(port, openrouterApiKey, model, monitorMode = fa
65526
65526
  target = modelMap.sonnet;
65527
65527
  else if (req.includes("haiku") && modelMap.haiku)
65528
65528
  target = modelMap.haiku;
65529
+ else if (model)
65530
+ target = model;
65531
+ } else if (model) {
65532
+ target = model;
65529
65533
  }
65530
65534
  if (isPoeModel(target)) {
65531
65535
  const poeHandler = getPoeHandler(target);
@@ -65540,7 +65544,8 @@ async function createProxyServer(port, openrouterApiKey, model, monitorMode = fa
65540
65544
  const localHandler = getLocalProviderHandler(target);
65541
65545
  if (localHandler)
65542
65546
  return localHandler;
65543
- const isNative = !target.includes("/");
65547
+ const hasExplicitProvider = target.includes("@");
65548
+ const isNative = !target.includes("/") && !hasExplicitProvider;
65544
65549
  if (isNative) {
65545
65550
  return nativeHandler;
65546
65551
  }
@@ -65927,6 +65932,8 @@ function getUpdateCommand2(method) {
65927
65932
  }
65928
65933
  async function runSelfUpdate() {
65929
65934
  const { getVersion: getVersion2 } = await Promise.resolve().then(() => (init_cli(), exports_cli));
65935
+ const { execSync: execSync2 } = await import("node:child_process");
65936
+ const { createInterface: createInterface3 } = await import("node:readline");
65930
65937
  const currentVersion = getVersion2();
65931
65938
  const installMethod = detectInstallMethod();
65932
65939
  console.log(`claudish v${currentVersion}`);
@@ -65948,12 +65955,39 @@ Checking for updates...
65948
65955
  console.log(`✓ claudish is up to date (v${currentVersion})`);
65949
65956
  process.exit(0);
65950
65957
  }
65958
+ const updateCmd = getUpdateCommand2(installMethod);
65951
65959
  console.log(`New version available: v${currentVersion} → v${latestVersion}
65952
65960
  `);
65953
- const updateCmd = getUpdateCommand2(installMethod);
65954
- console.log(`To update, run:
65961
+ const shouldUpdate = await new Promise((resolve) => {
65962
+ const rl = createInterface3({ input: process.stdin, output: process.stdout });
65963
+ rl.question("Update now? [Y/n] ", (answer) => {
65964
+ rl.close();
65965
+ const normalized = answer.toLowerCase().trim();
65966
+ resolve(normalized === "" || normalized === "y" || normalized === "yes");
65967
+ });
65968
+ });
65969
+ if (!shouldUpdate) {
65970
+ console.log(`
65971
+ Skipped. Update later with:
65972
+ ${updateCmd}
65973
+ `);
65974
+ process.exit(0);
65975
+ }
65976
+ console.log(`
65977
+ Updating...
65978
+ `);
65979
+ try {
65980
+ execSync2(updateCmd, { stdio: "inherit", shell: true });
65981
+ console.log(`
65982
+ ✓ Updated to v${latestVersion}! Please restart claudish.
65983
+ `);
65984
+ } catch {
65985
+ console.error(`
65986
+ Update failed. Try manually:
65955
65987
  ${updateCmd}
65956
65988
  `);
65989
+ process.exit(1);
65990
+ }
65957
65991
  process.exit(0);
65958
65992
  } catch (error46) {
65959
65993
  console.error("Failed to check for updates:", error46 instanceof Error ? error46.message : error46);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
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",