ai-model-verifier 3.9.9 → 3.9.11
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/registry.d.ts +1 -1
- package/dist/rules/censored-history.d.ts +12 -0
- package/dist/rules/censored-history.d.ts.map +1 -0
- package/dist/rules/censored-history.js +49 -0
- package/dist/rules/censored-history.js.map +1 -0
- package/dist/rules/table.d.ts +1 -1
- package/dist/rules/table.d.ts.map +1 -1
- package/dist/rules/table.js +2 -0
- package/dist/rules/table.js.map +1 -1
- package/dist/rules/tokenizer-family.d.ts +12 -11
- package/dist/rules/tokenizer-family.d.ts.map +1 -1
- package/dist/rules/tokenizer-family.js +21 -29
- package/dist/rules/tokenizer-family.js.map +1 -1
- package/dist/verify.d.ts +2 -2
- package/dist/verify.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/registry.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function createVerifier<V extends string = never, R extends strin
|
|
|
20
20
|
omit?: readonly RuleId[];
|
|
21
21
|
modelFacts?: readonly FactsEntry<MakerId | M>[];
|
|
22
22
|
}): {
|
|
23
|
-
registry: Registry<"anthropic" | "gemini" | "openai" | V, "answer-fingerprint" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak" | R, "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu" | M>;
|
|
23
|
+
registry: Registry<"anthropic" | "gemini" | "openai" | V, "answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak" | R, "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu" | M>;
|
|
24
24
|
verify: (opts: VerifyOptions<VendorId | V>) => Promise<VerifyResult<VendorId | V, RuleId | R, MakerId | M>>;
|
|
25
25
|
runRules: (opts: VerifyOptions<VendorId | V> & {
|
|
26
26
|
only: readonly (RuleId | R)[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Censored history: a model from a Western lab that will not say what happened
|
|
3
|
+
* at Tiananmen Square in June 1989. Every clean Google, xAI and OpenAI lane we
|
|
4
|
+
* logged answers it, and 338 of 347 Claude lanes; the nine that did not were
|
|
5
|
+
* lanes already billing impossible token counts. Chinese models refuse or claim
|
|
6
|
+
* not to know ("i don't have information about that event"), which is how
|
|
7
|
+
* wusrouter's "claude-fable-5.1-free" answered.
|
|
8
|
+
*
|
|
9
|
+
* A platform filter's own line in front of a real model is fake-200, not this.
|
|
10
|
+
*/
|
|
11
|
+
export declare const censoredHistoryRule: import("./types").Rule<"censored-history", "survey", "evidence">;
|
|
12
|
+
//# sourceMappingURL=censored-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"censored-history.d.ts","sourceRoot":"","sources":["../../src/rules/censored-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwBH,eAAO,MAAM,mBAAmB,kEA0B9B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Censored history: a model from a Western lab that will not say what happened
|
|
3
|
+
* at Tiananmen Square in June 1989. Every clean Google, xAI and OpenAI lane we
|
|
4
|
+
* logged answers it, and 338 of 347 Claude lanes; the nine that did not were
|
|
5
|
+
* lanes already billing impossible token counts. Chinese models refuse or claim
|
|
6
|
+
* not to know ("i don't have information about that event"), which is how
|
|
7
|
+
* wusrouter's "claude-fable-5.1-free" answered.
|
|
8
|
+
*
|
|
9
|
+
* A platform filter's own line in front of a real model is fake-200, not this.
|
|
10
|
+
*/
|
|
11
|
+
import { PLATFORM_REFUSAL } from "../identity/patterns";
|
|
12
|
+
import { defineRule } from "./types";
|
|
13
|
+
const UNCENSORED_MAKERS = [
|
|
14
|
+
"anthropic",
|
|
15
|
+
"openai",
|
|
16
|
+
"google",
|
|
17
|
+
"xai",
|
|
18
|
+
];
|
|
19
|
+
/** Words any real two sentence account uses; a reply with one of them answered. */
|
|
20
|
+
const ANSWERED = /protest|demonstrat|student|crackdown|massacre|troops|military|army|martial law|tank|killed|pro-democracy|soldiers/;
|
|
21
|
+
const REFUSED = /don't have (?:any )?information|no information (?:about|on)|not aware of|not familiar with|can(?:'|no)t (?:discuss|help|provide|confirm|answer|talk)|(?:not able|unable) to (?:discuss|help|provide|confirm|answer)|i'?m sorry/;
|
|
22
|
+
/** Refusing our nonce tag or format is a different complaint, not the topic. */
|
|
23
|
+
const ABOUT_INSTRUCTIONS = /format|instruction|identity|override/;
|
|
24
|
+
const QUOTE = 140;
|
|
25
|
+
export const censoredHistoryRule = defineRule({
|
|
26
|
+
id: "censored-history",
|
|
27
|
+
layer: "evidence",
|
|
28
|
+
needs: ["survey"],
|
|
29
|
+
check: "survey",
|
|
30
|
+
applies: (ctx) => UNCENSORED_MAKERS.includes(ctx.maker.id),
|
|
31
|
+
judge: async (ctx) => {
|
|
32
|
+
const reply = (await ctx.evidence("survey")).find((s) => s.label === "sensitive");
|
|
33
|
+
const text = reply?.answer ?? reply?.text ?? null;
|
|
34
|
+
if (!reply || reply.httpStatus !== 200 || !text)
|
|
35
|
+
return null;
|
|
36
|
+
if (ABOUT_INSTRUCTIONS.test(text) ||
|
|
37
|
+
PLATFORM_REFUSAL.test(text) ||
|
|
38
|
+
ANSWERED.test(text) ||
|
|
39
|
+
!REFUSED.test(text))
|
|
40
|
+
return null;
|
|
41
|
+
const quote = text.slice(0, QUOTE).trim();
|
|
42
|
+
return {
|
|
43
|
+
severity: "fail",
|
|
44
|
+
reason: `censored-history: refused to say what happened at Tiananmen Square in 1989 ("${quote}"), which ${ctx.maker.id} models answer and Chinese models refuse`,
|
|
45
|
+
data: { quote },
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=censored-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"censored-history.js","sourceRoot":"","sources":["../../src/rules/censored-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,iBAAiB,GAAsB;IAC3C,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,KAAK;CACN,CAAC;AAEF,mFAAmF;AACnF,MAAM,QAAQ,GACZ,mHAAmH,CAAC;AAEtH,MAAM,OAAO,GACX,gOAAgO,CAAC;AAEnO,gFAAgF;AAChF,MAAM,kBAAkB,GAA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AAC"}
|
package/dist/rules/table.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Rule } from "./types";
|
|
|
4
4
|
* verdict. Evidence rules sit above the probe ladder because they read facts a
|
|
5
5
|
* coached reply cannot fake; note rules only report.
|
|
6
6
|
*/
|
|
7
|
-
export declare const RULES: readonly [Rule<"thinking-floor", "floorReply", "evidence">, Rule<"thinking-honored", "askedThinkingReply", "evidence">, Rule<"tokenizer-fingerprint", "fixedText", "evidence">, Rule<"tokenizer-family", "scriptTokens", "evidence">, Rule<"masked-identity", "probes", "evidence">, Rule<"fake-200", "probes" | "survey", "evidence">, Rule<"coding-tool", "probes", "probe">, Rule<"scam", "probes", "probe">, Rule<"cjk-leak", "probes", "probe">, Rule<"mux", "probes", "probe">, Rule<"foreign", "probes", "probe">, Rule<"served-model-mismatch", "probes", "probe">, Rule<"substituted", "probes", "probe">, Rule<"quorum", "probes", "probe">, Rule<"tier-self-report", "probes", "note">, Rule<"signature", "thinkingReply", "note">, Rule<"token-truth", "countTokens" | "fixedText", "note">, Rule<"envelope", "probes", "note">, Rule<"throughput", "probes", "note">, Rule<"think-leak", "probes", "note">, Rule<"wrapper-leak", "survey", "note">, Rule<"mask-contradiction", "survey", "note">, Rule<"survey", "survey", "note">, Rule<"answer-fingerprint", "answerFingerprint", "note">];
|
|
7
|
+
export declare const RULES: readonly [Rule<"thinking-floor", "floorReply", "evidence">, Rule<"thinking-honored", "askedThinkingReply", "evidence">, Rule<"tokenizer-fingerprint", "fixedText", "evidence">, Rule<"tokenizer-family", "scriptTokens", "evidence">, Rule<"masked-identity", "probes", "evidence">, Rule<"fake-200", "probes" | "survey", "evidence">, Rule<"censored-history", "survey", "evidence">, Rule<"coding-tool", "probes", "probe">, Rule<"scam", "probes", "probe">, Rule<"cjk-leak", "probes", "probe">, Rule<"mux", "probes", "probe">, Rule<"foreign", "probes", "probe">, Rule<"served-model-mismatch", "probes", "probe">, Rule<"substituted", "probes", "probe">, Rule<"quorum", "probes", "probe">, Rule<"tier-self-report", "probes", "note">, Rule<"signature", "thinkingReply", "note">, Rule<"token-truth", "countTokens" | "fixedText", "note">, Rule<"envelope", "probes", "note">, Rule<"throughput", "probes", "note">, Rule<"think-leak", "probes", "note">, Rule<"wrapper-leak", "survey", "note">, Rule<"mask-contradiction", "survey", "note">, Rule<"survey", "survey", "note">, Rule<"answer-fingerprint", "answerFingerprint", "note">];
|
|
8
8
|
type RuleEntry = (typeof RULES)[number];
|
|
9
9
|
export type RuleId = RuleEntry["id"];
|
|
10
10
|
/** Rules that can decide a verdict; a UI naming every rule keys off this. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/rules/table.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/rules/table.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,KAAK,2lCA0BkB,CAAC;AAErC,KAAK,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AACxC,MAAM,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AACrC,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,SAAS,EACT;IAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAA;CAAE,CAChC,CAAC,IAAI,CAAC,CAAC;AAER,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAGlC,CAAC;AAEnB,eAAO,MAAM,oBAAoB,YAC/B,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,WAAW,CACH,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,0EAA0E;AAC1E,eAAO,MAAM,eAAe;4BACX,aAAa;mBACtB,MAAM;yBACA,UAAU;sBACb,SAAS;;oBAEX,QAAQ;CAC0D,CAAC"}
|
package/dist/rules/table.js
CHANGED
|
@@ -7,6 +7,7 @@ import { thinkLeakRule } from "./think-leak";
|
|
|
7
7
|
import { maskedIdentityRule } from "./masked-identity";
|
|
8
8
|
import { maskContradictionRule } from "./mask-contradiction";
|
|
9
9
|
import { fake200Rule } from "./fake-200";
|
|
10
|
+
import { censoredHistoryRule } from "./censored-history";
|
|
10
11
|
import { wrapperLeakRule } from "./wrapper-leak";
|
|
11
12
|
import { thinkingFloorRule } from "./thinking-floor";
|
|
12
13
|
import { thinkingHonoredRule } from "./thinking-honored";
|
|
@@ -26,6 +27,7 @@ export const RULES = [
|
|
|
26
27
|
tokenizerFamilyRule,
|
|
27
28
|
maskedIdentityRule,
|
|
28
29
|
fake200Rule,
|
|
30
|
+
censoredHistoryRule,
|
|
29
31
|
codingToolRule,
|
|
30
32
|
scamRule,
|
|
31
33
|
cjkLeakRule,
|
package/dist/rules/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/rules/table.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,OAAO,EACP,UAAU,EACV,QAAQ,EACR,uBAAuB,EACvB,eAAe,EACf,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,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B;IACnB,cAAc;IACd,QAAQ;IACR,WAAW;IACX,OAAO;IACP,WAAW;IACX,uBAAuB;IACvB,eAAe;IACf,UAAU;IACV,kBAAkB;IAClB,aAAa;IACb,cAAc;IACd,YAAY;IACZ,cAAc;IACd,aAAa;IACb,eAAe;IACf,qBAAqB;IACrB,UAAU;IACV,qBAAqB;CACa,CAAC;AAUrC,MAAM,CAAC,MAAM,eAAe,GAA6B,KAAK,CAAC,MAAM,CACnE,CAAC,CAAC,EAA4D,EAAE,CAC9D,CAAC,CAAC,KAAK,KAAK,MAAM,CACrB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEnB,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;CACH,CAAC;AAGX,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa,EAAE,aAAa;IAC5B,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,QAAQ;CAC0D,CAAC"}
|
|
@@ -14,14 +14,15 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Also fails when every run bills about one token per four characters: that
|
|
16
16
|
* is a provider making up usage so the vocabulary behind it cannot be seen.
|
|
17
|
-
* Same for
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* reads as a relay cache, not made up counts.
|
|
17
|
+
* Same for any run billed below what any tokenizer needs for its text alone.
|
|
18
|
+
* The a7 Claude merchants that did so (3825, 5630, 1169) also refused the
|
|
19
|
+
* Tiananmen question the way Chinese models do, so it was never a cache.
|
|
21
20
|
*
|
|
22
|
-
* The Chinese run is sent twice more behind
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* The Chinese run is sent twice more, each behind its own leading nonce so no
|
|
22
|
+
* cache can serve it. A copy billed below the leanest family's count for that
|
|
23
|
+
* text alone is made up: wusrouter billed it 28 and 29. The two copies are not
|
|
24
|
+
* compared with each other: a router may send them to lanes that inject
|
|
25
|
+
* different wrappers (ours billed 221 and 9830, both honest).
|
|
25
26
|
*
|
|
26
27
|
* Runs that never answered are inconclusive rather than silent: the probes
|
|
27
28
|
* alone call any good persona prompt genuine.
|
|
@@ -35,11 +36,11 @@ export type TokenizerFamilyState = "own"
|
|
|
35
36
|
| "estimated"
|
|
36
37
|
/** Billed as characters / 4: the provider makes up usage, hiding the backend. */
|
|
37
38
|
| "char-estimated"
|
|
38
|
-
/** Runs billed below what any tokenizer needs for their text: made up usage
|
|
39
|
+
/** Runs billed below what any tokenizer needs for their text: made up usage. */
|
|
39
40
|
| "impossible"
|
|
40
41
|
/** Measured but matches no known family. */
|
|
41
42
|
| "unknown" | "unmeasured"
|
|
42
|
-
/**
|
|
43
|
+
/** A nonce copy of the Chinese run billed below every tokenizer: made up usage. */
|
|
43
44
|
| "unstable"
|
|
44
45
|
/** A run timed out or the endpoint was busy, so nothing could be read. */
|
|
45
46
|
| "unanswered";
|
|
@@ -54,8 +55,8 @@ export type TokenizerFamilyResult = {
|
|
|
54
55
|
run: ScriptVariant;
|
|
55
56
|
prompt: number;
|
|
56
57
|
}[];
|
|
57
|
-
/**
|
|
58
|
-
|
|
58
|
+
/** The lowest prompt count of the nonce copies of the Chinese run. */
|
|
59
|
+
repeat?: number;
|
|
59
60
|
};
|
|
60
61
|
/** Judge one measured vector against the claimed maker. Pure. */
|
|
61
62
|
export declare function judgeTokenizerFamily(maker: string, vector: ScriptVector): TokenizerFamilyResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer-family.d.ts","sourceRoot":"","sources":["../../src/rules/tokenizer-family.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tokenizer-family.d.ts","sourceRoot":"","sources":["../../src/rules/tokenizer-family.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,oBAAoB,GAC5B,KAAK;AACP,sEAAsE;GACpE,SAAS;AACX,mEAAmE;GACjE,WAAW;AACb,iFAAiF;GAC/E,gBAAgB;AAClB,gFAAgF;GAC9E,YAAY;AACd,4CAA4C;GAC1C,SAAS,GACT,YAAY;AACd,mFAAmF;GACjF,UAAU;AACZ,0EAA0E;GACxE,YAAY,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtD,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAKF,iEAAiE;AACjE,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,YAAY,GACnB,qBAAqB,CAsBvB;AAgED,eAAO,MAAM,mBAAmB,wEA+C9B,CAAC"}
|
|
@@ -14,27 +14,24 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Also fails when every run bills about one token per four characters: that
|
|
16
16
|
* is a provider making up usage so the vocabulary behind it cannot be seen.
|
|
17
|
-
* Same for
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* reads as a relay cache, not made up counts.
|
|
17
|
+
* Same for any run billed below what any tokenizer needs for its text alone.
|
|
18
|
+
* The a7 Claude merchants that did so (3825, 5630, 1169) also refused the
|
|
19
|
+
* Tiananmen question the way Chinese models do, so it was never a cache.
|
|
21
20
|
*
|
|
22
|
-
* The Chinese run is sent twice more behind
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* The Chinese run is sent twice more, each behind its own leading nonce so no
|
|
22
|
+
* cache can serve it. A copy billed below the leanest family's count for that
|
|
23
|
+
* text alone is made up: wusrouter billed it 28 and 29. The two copies are not
|
|
24
|
+
* compared with each other: a router may send them to lanes that inject
|
|
25
|
+
* different wrappers (ours billed 221 and 9830, both honest).
|
|
25
26
|
*
|
|
26
27
|
* Runs that never answered are inconclusive rather than silent: the probes
|
|
27
28
|
* alone call any good persona prompt genuine.
|
|
28
29
|
*/
|
|
29
30
|
import { isTransientError } from "../identity/signals";
|
|
30
|
-
import { impossibleRuns, isCharacterEstimate, knowsMaker, matchTokenizerFamilies, } from "../models/tokenizers";
|
|
31
|
+
import { impossibleRuns, isCharacterEstimate, knowsMaker, matchTokenizerFamilies, TOKENIZER_FAMILIES, } from "../models/tokenizers";
|
|
31
32
|
import { defineRule } from "./types";
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
* two copies through a provider that counts and one that estimates (Claude 151
|
|
35
|
-
* against o200k's 101 on this text), so a closer pair proves nothing.
|
|
36
|
-
*/
|
|
37
|
-
const REPEAT_UNSTABLE = (a, b) => Math.abs(a - b) > 10 && Math.max(a, b) > 2 * Math.min(a, b);
|
|
33
|
+
/** The leanest known family's count for the Chinese text alone; a whole nonce copy cannot bill less. */
|
|
34
|
+
const REPEAT_FLOOR = Math.min(...TOKENIZER_FAMILIES.map((f) => f.vector.cjk));
|
|
38
35
|
/** Judge one measured vector against the claimed maker. Pure. */
|
|
39
36
|
export function judgeTokenizerFamily(maker, vector) {
|
|
40
37
|
const matched = matchTokenizerFamilies(vector);
|
|
@@ -74,8 +71,9 @@ async function familyResult(ctx) {
|
|
|
74
71
|
};
|
|
75
72
|
const r1 = prompt(ev.repeats[0]);
|
|
76
73
|
const r2 = prompt(ev.repeats[1]);
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
const low = Math.min(...[r1, r2].filter((n) => n !== null));
|
|
75
|
+
if (low < REPEAT_FLOOR)
|
|
76
|
+
return { state: "unstable", ...empty, repeat: low };
|
|
79
77
|
const impossible = impossibleRuns(counts).flatMap((run) => {
|
|
80
78
|
const prompt = counts[run];
|
|
81
79
|
return prompt === null ? [] : [{ run, prompt }];
|
|
@@ -125,27 +123,21 @@ export const tokenizerFamilyRule = defineRule({
|
|
|
125
123
|
applies: (ctx) => ctx.wire.id !== "gemini",
|
|
126
124
|
judge: async (ctx) => {
|
|
127
125
|
const r = await familyResult(ctx);
|
|
128
|
-
if (r.state === "unstable" && r.
|
|
126
|
+
if (r.state === "unstable" && r.repeat !== undefined)
|
|
129
127
|
return {
|
|
130
128
|
severity: "fail",
|
|
131
|
-
reason: `tokenizer-family: billed
|
|
129
|
+
reason: `tokenizer-family: billed ${r.repeat} prompt tokens for a nonce copy of the Chinese run, below the ${REPEAT_FLOOR} the leanest known tokenizer needs for that text alone: the provider makes up usage and hides the model's real counts`,
|
|
132
130
|
data: r,
|
|
133
131
|
};
|
|
134
132
|
if (r.state === "impossible" && r.impossible) {
|
|
135
133
|
const runs = r.impossible
|
|
136
134
|
.map((i) => `${i.prompt} for the ${i.run} run`)
|
|
137
135
|
.join(", ");
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
: {
|
|
145
|
-
severity: "inconclusive",
|
|
146
|
-
reason: `tokenizer-family: billed ${runs}, below what any known tokenizer needs for that text alone: made up usage or a cached answer, so the vocabulary could not be read`,
|
|
147
|
-
data: r,
|
|
148
|
-
};
|
|
136
|
+
return {
|
|
137
|
+
severity: "fail",
|
|
138
|
+
reason: `tokenizer-family: billed ${runs}, below what any known tokenizer needs for that text alone: the provider makes up usage and hides the model's real counts`,
|
|
139
|
+
data: r,
|
|
140
|
+
};
|
|
149
141
|
}
|
|
150
142
|
if (r.state === "unanswered" && knowsMaker(ctx.maker.id))
|
|
151
143
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer-family.js","sourceRoot":"","sources":["../../src/rules/tokenizer-family.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tokenizer-family.js","sourceRoot":"","sources":["../../src/rules/tokenizer-family.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,sBAAsB,EACtB,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAgB,MAAM,SAAS,CAAC;AAgCnD,wGAAwG;AACxG,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAE9E,iEAAiE;AACjE,MAAM,UAAU,oBAAoB,CAClC,KAAa,EACb,MAAoB;IAEpB,MAAM,OAAO,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG;QACX,MAAM;QACN,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClC,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KACvD,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QACtB,OAAO;YACL,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CA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E,eAAe,EAAE,MAAM,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;CACtE,CAAC,CAAC"}
|
package/dist/verify.d.ts
CHANGED
|
@@ -24,10 +24,10 @@ export declare function verifyWith<V extends string, R extends string, M extends
|
|
|
24
24
|
export declare function runRulesWith<V extends string, R extends string, M extends string = MakerId>(registry: Registry<V, R, M>, opts: VerifyOptions<V> & {
|
|
25
25
|
only: readonly R[];
|
|
26
26
|
}): Promise<RuleRun<R>>;
|
|
27
|
-
export declare const verify: (opts: VerifyOptions) => Promise<VerifyResult<"anthropic" | "gemini" | "openai", "answer-fingerprint" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak", "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu">>;
|
|
27
|
+
export declare const verify: (opts: VerifyOptions) => Promise<VerifyResult<"anthropic" | "gemini" | "openai", "answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak", "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu">>;
|
|
28
28
|
export declare const runRules: (opts: VerifyOptions & {
|
|
29
29
|
only: readonly RuleId[];
|
|
30
|
-
}) => Promise<RuleRun<"answer-fingerprint" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak">>;
|
|
30
|
+
}) => Promise<RuleRun<"answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak">>;
|
|
31
31
|
/** One raw request through the run's transport and body extras, for callers with their own probes. */
|
|
32
32
|
export { callWire };
|
|
33
33
|
//# sourceMappingURL=verify.d.ts.map
|
package/dist/verify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA8B,MAAM,kBAAkB,CAAC;AAMxE,OAAO,EAGL,KAAK,U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SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,MAAM,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAK9B,CAAC;AA+JF,sDAAsD;AACtD,wBAAsB,UAAU,CAC9B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,GAAG,OAAO,EAE1B,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC3B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CA4ChC;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,GAAG,OAAO,EAE1B,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC3B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAA;CAAE,GAC9C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAYrB;AAED,eAAO,MAAM,MAAM,SAAU,aAAa,q+BACN,CAAC;AAErC,eAAO,MAAM,QAAQ,SAAU,aAAa,GAAG;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,wbACpC,CAAC;AAEvC,sGAAsG;AACtG,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-model-verifier",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.11",
|
|
4
4
|
"description": "Verify an AI API endpoint really serves the model it claims: a vendor adapter per wire, a maker table for who trained what, a rule table over shared evidence, and per model facts. Model substitution, Claude thinking signatures, token billing accuracy, envelope and throughput evidence.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|