@antseed/model-verifier

中文文档
0.1.4发布于 2026/11/05TypeScriptES Module近 30 天下载 2253

Standalone KBF model verifier: audit any OpenAI- or Anthropic-compatible endpoint against a published model reference

原始使用文档

@antseed/model-verifier

Checks whether the model behind an endpoint is the model it claims to be. It works with any OpenAI- or Anthropic-compatible endpoint: an Antseed peer through the local buyer proxy, another network, or a provider's own API.

It uses Knowledge Boundary Fingerprinting (KBF). A published reference holds numeric recall probes that the genuine model answers consistently and cheaper substitutes get wrong, plus the genuine model's own error rate on them. An audit sends a fresh random subset in a fresh order, with varied prompt wording, and runs a one-sided binomial test of the endpoint's mismatches against that honest error rate.

VERIFY_API_KEY=... npx antseed-verify \
  --base-url https://openrouter.ai/api/v1 \
  --model meta-llama/llama-3.3-70b-instruct \
  --reference ./llama-3.3-70b.kbf.json
VerdictMeaningExit code
SAMENo evidence of substitution at the reference's statistical power0
DIFFSignificantly more mismatches than the genuine model makes2
UNDETERMINEDNot every probe could be judged (the same rule as on-chain audits)3

An endpoint that answers none of the requests (wrong key, URL or model id) is an error (exit 1) with the reason, not a verdict. Published audits are fetched from ipfs.io, then other public gateways if one rate-limits; --ipfs-gateway pins one.

To reuse the probes of a published Antseed model audit, pass --audit ipfs://<cid> instead of --reference. The verifier checks the audit evidence against its hash and uses the largest KBF reference the audit published. antseed verifier check <model> (in @antseed/cli) finds the latest on-chain audit for you.

Before the probes, the audit works out how to turn off the endpoint's hidden reasoning, as the KBF reference code does for every endpoint: it tries reasoning: {effort: "none"}, reasoning: {effort: "minimal"}, thinking: {type: "disabled"}, enable_thinking: false, a <think></think> prefill (OpenAI only) and nothing, each on a fixed ten-question batch, and keeps the first giving at least 5 answers with no reasoning tokens. An endpoint that thinks whatever it is sent gets 50 times the token budget (40,000 tokens per request). The result's thinkingDiscovery records the attempts; discoverThinking: false sends the reference's suppression instead.

Use --protocol anthropic for Messages-API endpoints, --out audit.json to keep the raw request and response bytes, and --json for machine-readable output.

References are content-addressed: referenceId is a hash of the reference itself, and loadReference rejects one whose content does not match it. Build references with antseed verifier reference (in @antseed/cli).

Library

import { auditEndpoint, loadReference, OpenAIChatEndpoint, resolveAuditReference } from '@antseed/model-verifier'

const result = await auditEndpoint({
  endpoint: new OpenAIChatEndpoint({ baseUrl, apiKey }),
  reference: await loadReference('ipfs://<cid>'),
})
console.log(result.evaluation.verdict)

// Or reuse the reference of a published Antseed audit:
const { reference } = await resolveAuditReference('ipfs://<audit-cid>')

Any transport can be audited by implementing ModelEndpoint, so anyone can re-check an AntseedKbfVerification audit against its published evidence.

版本与发布记录

@antseed/model-verifier 共发布 6 个版本,首次发布于 2026/10/22;过去 12 个月发布了 6 个版本。

版本发布日期距今
0.1.4latest2026/11/052 天前
0.1.32026/11/043 天前
0.1.22026/11/016 天前
0.1.12026/10/2612 天前
0.1.02026/10/2216 天前
0.0.0-stage2026/10/2216 天前

关于 @antseed/model-verifier 的常见问题

@antseed/model-verifier 是什么?

Standalone KBF model verifier: audit any OpenAI- or Anthropic-compatible endpoint against a published model reference

如何安装 @antseed/model-verifier?

在项目目录运行 npm install @antseed/model-verifier,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 antseed-verify,可以用 npx antseed-verify 直接运行。

@antseed/model-verifier 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antseed/model-verifier 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@antseed/model-verifier 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@antseed/model-verifier 可以商用吗?

@antseed/model-verifier 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@antseed/model-verifier 的下载量有多少?

根据 npm 官方下载统计,@antseed/model-verifier 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,253 次,日均约 75 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@antseed/model-verifier 还在维护吗?

最新版本 0.1.4 发布于 2026/11/05(2 天前);至今共发布 6 个版本,其中过去 12 个月发布了 6 个;首次发布于 2026/10/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。