claudish 5.7.0 → 5.8.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.
Files changed (2) hide show
  1. package/dist/index.js +26 -4
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -30498,7 +30498,15 @@ __export(exports_cli, {
30498
30498
  getMissingKeyResolutions: () => getMissingKeyResolutions,
30499
30499
  getMissingKeyError: () => getMissingKeyError
30500
30500
  });
30501
- import { readFileSync as readFileSync10, writeFileSync as writeFileSync5, existsSync as existsSync12, mkdirSync as mkdirSync5, copyFileSync, readdirSync, unlinkSync as unlinkSync3 } from "node:fs";
30501
+ import {
30502
+ readFileSync as readFileSync10,
30503
+ writeFileSync as writeFileSync5,
30504
+ existsSync as existsSync12,
30505
+ mkdirSync as mkdirSync5,
30506
+ copyFileSync,
30507
+ readdirSync,
30508
+ unlinkSync as unlinkSync3
30509
+ } from "node:fs";
30502
30510
  import { fileURLToPath as fileURLToPath3 } from "node:url";
30503
30511
  import { dirname as dirname3, join as join12 } from "node:path";
30504
30512
  import { homedir as homedir11 } from "node:os";
@@ -31836,7 +31844,7 @@ async function fetchGLMCodingModels() {
31836
31844
  return [];
31837
31845
  }
31838
31846
  }
31839
- var __filename4, __dirname4, VERSION = "5.7.0", CACHE_MAX_AGE_DAYS2 = 2, MODELS_JSON_PATH, CLAUDISH_CACHE_DIR2, ALL_MODELS_JSON_PATH;
31847
+ var __filename4, __dirname4, VERSION = "5.8.0", CACHE_MAX_AGE_DAYS2 = 2, MODELS_JSON_PATH, CLAUDISH_CACHE_DIR2, ALL_MODELS_JSON_PATH;
31840
31848
  var init_cli = __esm(() => {
31841
31849
  init_config();
31842
31850
  init_model_loader();
@@ -64925,7 +64933,21 @@ var init_anthropic_passthrough_adapter = __esm(() => {
64925
64933
  return "AnthropicPassthroughAdapter";
64926
64934
  }
64927
64935
  convertMessages(claudeRequest, _filterFn) {
64928
- return claudeRequest.messages || [];
64936
+ const messages = claudeRequest.messages || [];
64937
+ return messages.map((msg) => this.stripUnsupportedContentTypes(msg));
64938
+ }
64939
+ stripUnsupportedContentTypes(message) {
64940
+ if (!message.content || !Array.isArray(message.content)) {
64941
+ return message;
64942
+ }
64943
+ const filteredContent = message.content.map((block) => {
64944
+ if (block.type === "tool_result" && Array.isArray(block.content)) {
64945
+ const filtered = block.content.filter((c) => c.type !== "tool_reference");
64946
+ return { ...block, content: filtered.length > 0 ? filtered : [{ type: "text", text: "" }] };
64947
+ }
64948
+ return block;
64949
+ }).filter((block) => block.type !== "tool_reference");
64950
+ return { ...message, content: filteredContent };
64929
64951
  }
64930
64952
  convertTools(claudeRequest, _summarize) {
64931
64953
  return claudeRequest.tools || [];
@@ -65241,7 +65263,7 @@ async function createProxyServer(port, openrouterApiKey, model, monitorMode = fa
65241
65263
  const poeHandlers = new Map;
65242
65264
  const getOpenRouterHandler = (targetModel) => {
65243
65265
  const parsed = parseModelSpec(targetModel);
65244
- const modelId = parsed.provider !== "native-anthropic" ? parsed.model : targetModel;
65266
+ const modelId = targetModel.includes("@") ? parsed.model : targetModel;
65245
65267
  if (!openRouterHandlers.has(modelId)) {
65246
65268
  const orProvider = new OpenRouterProvider(openrouterApiKey || "");
65247
65269
  const orAdapter = new OpenRouterAdapter(modelId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "5.7.0",
3
+ "version": "5.8.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",
@@ -18,7 +18,8 @@
18
18
  "typecheck": "tsc --noEmit",
19
19
  "lint": "biome check .",
20
20
  "format": "biome format --write .",
21
- "test": "bun test"
21
+ "test": "bun test",
22
+ "smoke": "bun run scripts/smoke-test.ts"
22
23
  },
23
24
  "dependencies": {
24
25
  "@inquirer/prompts": "^8.0.1",