local-model-suitability-mcp 1.1.3 → 1.1.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/server.js +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.4] - 2026-04-27
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `token_count` field on all tool responses — lets orchestrator budget ledgers track token cost per call
|
|
7
|
+
- `/ready` endpoint — returns 200 when `ANTHROPIC_API_KEY` is present, 503 otherwise
|
|
8
|
+
- Phase 4 enhanced error objects: `category`, `retryable`, `retry_after_ms`, `fallback_tool`, `trace_id` on all error returns
|
|
9
|
+
|
|
3
10
|
## [1.1.3] - 2026-04-26
|
|
4
11
|
|
|
5
12
|
### Improved
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-model-suitability-mcp",
|
|
3
3
|
"mcpName": "io.github.OjasKord/local-model-suitability-mcp",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.4",
|
|
5
5
|
"description": "Check whether a task can run on a local model instead of cloud. Save money on every call that does not need cloud inference.",
|
|
6
6
|
"main": "src/server.js",
|
|
7
7
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.OjasKord/local-model-suitability-mcp",
|
|
4
4
|
"title": "Local Model Suitability MCP",
|
|
5
5
|
"description": "Check if a task runs locally vs cloud. Save money on calls that don't need cloud inference.",
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.4",
|
|
7
7
|
"websiteUrl": "https://kordagencies.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/OjasKord/local-model-suitability-mcp",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "local-model-suitability-mcp",
|
|
16
|
-
"version": "1.1.
|
|
16
|
+
"version": "1.1.4",
|
|
17
17
|
"transport": { "type": "stdio" },
|
|
18
18
|
"environmentVariables": [
|
|
19
19
|
{ "name": "ANTHROPIC_API_KEY", "description": "Anthropic API key for Claude routing analysis", "isRequired": true, "isSecret": true }
|
package/src/server.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createHmac, timingSafeEqual } from 'crypto';
|
|
|
3
3
|
import { readFileSync, writeFileSync } from 'fs';
|
|
4
4
|
import Anthropic from '@anthropic-ai/sdk';
|
|
5
5
|
|
|
6
|
-
const VERSION = '1.1.
|
|
6
|
+
const VERSION = '1.1.4';
|
|
7
7
|
const PERSIST_FILE = '/tmp/lms_stats.json';
|
|
8
8
|
const LEGAL_DISCLAIMER = 'AI-powered routing analysis. We do not log or store your task content. Results are for cost-optimisation guidance only. Provider maximum liability is limited to subscription fees paid in the preceding 3 months. Full terms: kordagencies.com/terms.html';
|
|
9
9
|
|
|
@@ -191,7 +191,7 @@ Respond ONLY with a JSON object — no markdown, no explanation outside the JSON
|
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
const _rLms = {
|
|
195
195
|
...parsed,
|
|
196
196
|
task_quality_threshold: quality,
|
|
197
197
|
data_sensitivity: sensitivity,
|
|
@@ -199,6 +199,8 @@ Respond ONLY with a JSON object — no markdown, no explanation outside the JSON
|
|
|
199
199
|
checked_at: nowISO(),
|
|
200
200
|
_disclaimer: LEGAL_DISCLAIMER
|
|
201
201
|
};
|
|
202
|
+
_rLms.token_count = Math.ceil(JSON.stringify(_rLms).length / 4);
|
|
203
|
+
return _rLms;
|
|
202
204
|
}
|
|
203
205
|
|
|
204
206
|
// ── Stripe webhook ────────────────────────────────────────────────────────────
|
|
@@ -286,6 +288,14 @@ const server = createServer(async (req, res) => {
|
|
|
286
288
|
return;
|
|
287
289
|
}
|
|
288
290
|
|
|
291
|
+
if (req.url === '/ready' && (req.method === 'GET' || req.method === 'HEAD')) {
|
|
292
|
+
const checks = { anthropic: !!(process.env.ANTHROPIC_API_KEY) };
|
|
293
|
+
const ready = checks.anthropic;
|
|
294
|
+
res.writeHead(ready ? 200 : 503, { ...cors, 'Content-Type': 'application/json' });
|
|
295
|
+
res.end(JSON.stringify({ status: ready ? 'ready' : 'not_ready', version: VERSION, checks }));
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
289
299
|
// Deps
|
|
290
300
|
if (req.url === '/deps' && req.method === 'GET') {
|
|
291
301
|
let anthropicOk = false;
|
|
@@ -324,7 +334,7 @@ const server = createServer(async (req, res) => {
|
|
|
324
334
|
// Server card (Smithery)
|
|
325
335
|
if (req.url === '/.well-known/mcp/server-card.json') {
|
|
326
336
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
327
|
-
res.end(JSON.stringify({ name: 'local-model-suitability-mcp', version: VERSION, description: 'Check whether a task can run locally instead of cloud — save money on every call that doesn\'t need cloud inference.', tools: [TOOL_DEFINITION], transport: '
|
|
337
|
+
res.end(JSON.stringify({ name: 'local-model-suitability-mcp', version: VERSION, description: 'Check whether a task can run locally instead of cloud — save money on every call that doesn\'t need cloud inference.', tools: [TOOL_DEFINITION], transport: 'streamable-http', homepage: 'https://kordagencies.com', author: 'ojas1', token_footprint_min: 204, token_footprint_max: 230, token_footprint_avg: 217, idempotent_tools: ['check_local_viability'], circuit_breaker: false, health_endpoint: '/health', ready_endpoint: '/ready' }));
|
|
328
338
|
return;
|
|
329
339
|
}
|
|
330
340
|
|