claudish 4.6.5 → 4.6.7

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 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) {
@@ -33176,7 +33192,7 @@ var getRemoteProviders = () => [
33176
33192
  prefixes: ["gc/"],
33177
33193
  capabilities: {
33178
33194
  supportsTools: true,
33179
- supportsVision: true,
33195
+ supportsVision: false,
33180
33196
  supportsStreaming: true,
33181
33197
  supportsJsonMode: true,
33182
33198
  supportsReasoning: true
@@ -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.7", 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();
@@ -62688,9 +62704,32 @@ class OpenAIHandler {
62688
62704
  this.sessionTotalCost += cost;
62689
62705
  this.writeTokenFile(Math.max(inputTokens, this.sessionInputTokens), this.sessionOutputTokens, pricing.isEstimate);
62690
62706
  }
62707
+ supportsVision() {
62708
+ if (this.provider.capabilities && !this.provider.capabilities.supportsVision) {
62709
+ return false;
62710
+ }
62711
+ const model = this.modelName.toLowerCase();
62712
+ if (model.startsWith("glm-") && !/\d+\.?\d*v/.test(model)) {
62713
+ return false;
62714
+ }
62715
+ return true;
62716
+ }
62691
62717
  convertMessages(claudeRequest) {
62692
62718
  const useSimpleFormat = this.provider.name === "ollamacloud";
62693
- return convertMessagesToOpenAI(claudeRequest, `openai/${this.modelName}`, filterIdentity, useSimpleFormat);
62719
+ const messages = convertMessagesToOpenAI(claudeRequest, `openai/${this.modelName}`, filterIdentity, useSimpleFormat);
62720
+ if (!this.supportsVision()) {
62721
+ for (const msg of messages) {
62722
+ if (Array.isArray(msg.content)) {
62723
+ msg.content = msg.content.filter((part) => part.type !== "image_url");
62724
+ if (msg.content.length === 1 && msg.content[0].type === "text") {
62725
+ msg.content = msg.content[0].text;
62726
+ } else if (msg.content.length === 0) {
62727
+ msg.content = "";
62728
+ }
62729
+ }
62730
+ }
62731
+ }
62732
+ return messages;
62694
62733
  }
62695
62734
  convertTools(claudeRequest) {
62696
62735
  return convertToolsToOpenAI(claudeRequest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "4.6.5",
3
+ "version": "4.6.7",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.2.0",
3
- "lastUpdated": "2026-02-13",
3
+ "lastUpdated": "2026-02-14",
4
4
  "source": "https://openrouter.ai/models?categories=programming&fmt=cards&order=top-weekly",
5
5
  "models": [
6
6
  {