claudish 4.6.5 → 4.6.6

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 +32 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31575,23 +31575,39 @@ async function getFreeModels() {
31575
31575
  async function getAllModelsForSearch() {
31576
31576
  const litellmBaseUrl = process.env.LITELLM_BASE_URL;
31577
31577
  const litellmApiKey = process.env.LITELLM_API_KEY;
31578
- const fetchPromises = [
31579
- fetchAllModels().then((models) => models.map(toModelInfo)),
31580
- fetchXAIModels(),
31581
- fetchGeminiModels(),
31582
- fetchOpenAIModels(),
31583
- fetchGLMDirectModels(),
31584
- fetchGLMCodingModels(),
31585
- fetchOllamaCloudModels(),
31586
- fetchZenFreeModels()
31578
+ const fetchEntries = [
31579
+ { name: "OpenRouter", promise: fetchAllModels().then((models) => models.map(toModelInfo)) },
31580
+ { name: "xAI", promise: fetchXAIModels() },
31581
+ { name: "Gemini", promise: fetchGeminiModels() },
31582
+ { name: "OpenAI", promise: fetchOpenAIModels() },
31583
+ { name: "GLM", promise: fetchGLMDirectModels() },
31584
+ { name: "GLM Coding", promise: fetchGLMCodingModels() },
31585
+ { name: "OllamaCloud", promise: fetchOllamaCloudModels() },
31586
+ { name: "Zen", promise: fetchZenFreeModels() }
31587
31587
  ];
31588
31588
  if (litellmBaseUrl && litellmApiKey) {
31589
- fetchPromises.push(fetchLiteLLMModels(litellmBaseUrl, litellmApiKey));
31590
- }
31591
- const results = await Promise.all(fetchPromises);
31592
- const [openRouterModels, xaiModels, geminiModels, openaiModels, glmDirectModels, glmCodingModels, ollamaCloudModels, zenModels, litellmModels = []] = results;
31593
- const directApiModels = [...xaiModels, ...geminiModels, ...openaiModels, ...glmDirectModels, ...glmCodingModels];
31594
- const allModels = [...zenModels, ...ollamaCloudModels, ...directApiModels, ...litellmModels, ...openRouterModels];
31589
+ fetchEntries.push({ name: "LiteLLM", promise: fetchLiteLLMModels(litellmBaseUrl, litellmApiKey) });
31590
+ }
31591
+ const settled = await Promise.allSettled(fetchEntries.map((e) => e.promise));
31592
+ const fetchResults = {};
31593
+ for (let i = 0;i < settled.length; i++) {
31594
+ const result = settled[i];
31595
+ fetchResults[fetchEntries[i].name] = result.status === "fulfilled" ? result.value : [];
31596
+ }
31597
+ const directApiModels = [
31598
+ ...fetchResults["xAI"],
31599
+ ...fetchResults["Gemini"],
31600
+ ...fetchResults["OpenAI"],
31601
+ ...fetchResults["GLM"],
31602
+ ...fetchResults["GLM Coding"]
31603
+ ];
31604
+ const allModels = [
31605
+ ...fetchResults["Zen"],
31606
+ ...fetchResults["OllamaCloud"],
31607
+ ...directApiModels,
31608
+ ...fetchResults["LiteLLM"] || [],
31609
+ ...fetchResults["OpenRouter"]
31610
+ ];
31595
31611
  return allModels;
31596
31612
  }
31597
31613
  function formatModelChoice(model, showSource = false) {
@@ -34874,7 +34890,7 @@ async function fetchGLMCodingModels2() {
34874
34890
  return [];
34875
34891
  }
34876
34892
  }
34877
- var __filename5, __dirname5, VERSION = "4.6.5", CACHE_MAX_AGE_DAYS3 = 2, MODELS_JSON_PATH, CLAUDISH_CACHE_DIR3, ALL_MODELS_JSON_PATH2;
34893
+ var __filename5, __dirname5, VERSION = "4.6.6", CACHE_MAX_AGE_DAYS3 = 2, MODELS_JSON_PATH, CLAUDISH_CACHE_DIR3, ALL_MODELS_JSON_PATH2;
34878
34894
  var init_cli = __esm(() => {
34879
34895
  init_config();
34880
34896
  init_model_loader();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "4.6.5",
3
+ "version": "4.6.6",
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",