@modelstatus/cli 0.1.31 → 0.1.32
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/package.json +1 -1
- package/src/detect/core.js +13 -1
- package/src/sources/filesystem.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelstatus/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Track which AI models you use, where, and never get surprised by a retirement. Free offline model-health for any repo (mm status), browser sign-in for cloud inventory + alerts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
package/src/detect/core.js
CHANGED
|
@@ -57,6 +57,18 @@ function looksLikeModel(s) {
|
|
|
57
57
|
return s.length >= 5 && /[0-9]/.test(s) && !BANNED_TAIL.test(s);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
// Detection strings that are ALSO everyday code/English words. Cohere's bare
|
|
61
|
+
// "command" id is the classic offender — `command = ['git', …]` is NOT a model,
|
|
62
|
+
// yet it flooded scans with thousands of false "Command" hits. These are dropped
|
|
63
|
+
// from the EXACT list, so a lone token never matches; the provider-qualified slug
|
|
64
|
+
// ("cohere/command") and longer ids ("command-r", "command-light") still do.
|
|
65
|
+
// Distinctive bare names (claude, gemini, codestral, davinci) are NOT here.
|
|
66
|
+
export const STOPWORDS = new Set([
|
|
67
|
+
"command", "code", "chat", "agent", "model", "models", "embed", "embedding",
|
|
68
|
+
"base", "rank", "rerank", "light", "instant", "completion", "search", "vision",
|
|
69
|
+
"audio", "image", "text", "assistant", "generate", "classify", "summarize", "tool",
|
|
70
|
+
]);
|
|
71
|
+
|
|
60
72
|
/** Compile detection patterns into reusable matchers (do this once per scan). */
|
|
61
73
|
export function compilePatterns(patterns) {
|
|
62
74
|
const exact = [];
|
|
@@ -64,7 +76,7 @@ export function compilePatterns(patterns) {
|
|
|
64
76
|
// Registry strings are curated, and the boundary matcher prevents embedded
|
|
65
77
|
// matches — so a low floor is safe and lets short real ids (o1, o3) resolve.
|
|
66
78
|
// (The old >=4 floor silently dropped the entire OpenAI o-series.)
|
|
67
|
-
if (ms.match && ms.match.length >= 2) exact.push(ms.match.toLowerCase());
|
|
79
|
+
if (ms.match && ms.match.length >= 2 && !STOPWORDS.has(ms.match.toLowerCase())) exact.push(ms.match.toLowerCase());
|
|
68
80
|
}
|
|
69
81
|
const generic = (patterns.generic_model_regexes || []).map((r) => new RegExp(r, "gi"));
|
|
70
82
|
return { exact, generic };
|
|
Binary file
|