HoneyMeta/ccfingerprint
About
🔍 AI Model Identity Fingerprinting – detect model downgrades with capability probes + deterministic local scoring | AI 模型身份指纹识别:能力探针 + 本地确定性评分,检测模型降智/偷换
AI & Machine LearningMeasured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
Original
Is your AI model really the one you paid for?
The model answers a set of probes and a local script scores them deterministically: no trust in what the
model says about itself, and it never grades itself.
Swapped models, downgrades, disabled reasoning, truncated
context behind an API relay: one command tells you.
Install · How it works · Test a relay · Downgrade check · Monitoring · Changelog
[!TIP] New in v2.6:
ccfp iq, a dedicated downgrade check. It catches a smaller model behind the same name, reasoning effort turned down or off, a truncated long context, a capped output, and requests split onto channels that add a hidden prompt. Read more →
Ever feel like your AI assistant suddenly got "dumber"? Suspect the model was secretly swapped and isn't actually what the provider claims?
CCFingerprint makes the model answer a set of probes, then scores the answers deterministically with a local script — it does not rely on the model's self-declaration, and it never lets the model grade itself. This helps you tell whether the model behind your AI assistant is genuine, or has been quietly downgraded.
✨ Highlights
- Ignores what the model claims. The self-declared identity is only recorded. The verdict comes from what the model actually knows and can solve; scoring runs in a local script and the answer keys never reach the model.
- Three ways to test: type
/fingerprintin any of 14 AI assistants; pointccfp probeat an API relay; runccfp iqfor downgrades (tasks are generated fresh from a random seed, so they cannot be memorised). - Reads the API's own signals: returned
modelfield, prompt token counts,<think>tags, response ids, reasoning tokens. Model swaps, rotating routes and injected hidden prompts leave traces here. - Compares against the official API: save one run against the official endpoint as a baseline, then compare a relay: same tokenizer or not, a fixed number of extra tokens or not.
- Keeps watching:
ccfp run/ccfp watchtest many endpoints on a schedule and alert when one changes; works with cron and CI. - Reports you can share: Markdown, a self-contained HTML page (light/dark), JSON; CI-friendly exit codes.
🚀 Installation
Open your AI assistant (Claude Code / Codex / Cursor / Copilot …) in your project and tell it:
The assistant follows the "Install steps for AI assistants" below.
Install steps for AI assistants
- Install the CLI straight from GitHub (needs Node.js 20+ and git):
npm install -g github:HoneyMeta/ccfingerprint - In the user's project root, run
ccfp initfor the assistant you are (see the "Supported AI Assistants" table; add--lang enfor English):
Without permission for a global install, run it directly instead:ccfp init --ai claude --lang en # Claude Code; use codex for Codex, cursor for Cursor, …npx -y github:HoneyMeta/ccfingerprint init --ai claude --lang en. - Tell the user to type
/fingerprint($fingerprintin Codex). Some clients need a restart or window reload before a new command shows up.
⚠️ The
ccfingerprintpackage on npm is stuck at the old 1.1.0 and no longer maintained (it has noccfp verify). Do not usenpm install -g ccfingerprint— GitHub is the source of truth.
To install manually, run steps 1 and 2 yourself.
⚡ Usage (one step)
Once installed, type /fingerprint in your AI assistant ($fingerprint in Codex). The model will automatically:
- answer every probe from its built-in knowledge;
- write
ccfp-report.json; - run
ccfp verify ccfp-report.jsonitself (falling back tonpx -y github:HoneyMeta/ccfingerprint verify …); - show you the deterministic verdict.
If an assistant cannot run terminal commands, the model writes
ccfp-report.jsonand asks you to runccfp verify ccfp-report.jsonmanually.
🧭 How it works
In one line: ccfp init installs the command → type /fingerprint in your assistant → the model answers, writes
ccfp-report.json and runs ccfp verify itself → you get the verdict and ccfp-verdict.md, all inside a single
/fingerprint (diagram at the top of this page).
The model answers four kinds of probes (the prompt contains only the questions, never the answers):
- Self-declaration — model ID, provider, context length, cutoff. Recorded for comparison only; not trusted on its own.
- Knowledge-boundary probes — date-anchored, time-sensitive questions used to infer the real cutoff, to catch confident fabrication, and to spot web lookups (knowing events after the claimed cutoff).
- Capability probes (downgrade detection) — tiered, single-answer tasks (counting, strict instruction following, needle recall with a decoy, code tracing, calendar arithmetic, logic, number theory). A low pass-rate = likely swapped for a weaker model.
- Style fingerprint — ASCII signature, for human reference.
ccfp verify reads the report offline, scores it against built-in answer keys, infers the real cutoff, computes the capability pass-rate, checks the claimed identity against the knowledge it demonstrates, and produces a 0–100 confidence score and a verdict (trustworthy / questionable / not trustworthy). None of this scoring goes through the model under test.
Reports written by ccfp probe also carry per-request API metadata (returned model, prompt/completion tokens, response id, latency, whether <think> appeared), and verify checks the items in the "API signals" table above. Multi-run reports are scored by their worst run.
🔌 Test an API relay directly (ccfp probe)
The API key is read only from an environment variable (CCFP_API_KEY by default) and is never written to the report.
# bash / zsh
export CCFP_API_KEY=sk-...
# PowerShell
$env:CCFP_API_KEY="sk-..."
# OpenAI-compatible endpoint (most relays)
ccfp probe --base-url https://relay.example.com/v1 --model claude-opus-5-5 --lang en
# Anthropic Messages endpoint, quick mode, 3 runs to catch rotating routing
ccfp probe --api anthropic --base-url https://relay.example.com --model claude-opus-5-5 --quick --runs 3 --lang en
--base-url may end in /v1 or be just the host. The raw report goes to ccfp-report.json (change it with --report) and the verdict to ccfp-verdict.md.
Compare with the official API (most reliable). Run once with an official key and save it as the baseline, then test the relay with the same options:
ccfp probe --base-url https://api.anthropic.com --api anthropic --model claude-opus-5-5 --quick --lang en --report official.json
ccfp probe --base-url https://relay.example.com --api anthropic --model claude-opus-5-5 --quick --lang en --baseline official.json
The baseline and the tested report must use the same dataset version, the same --lang and the same probe set (both with or both without --quick); otherwise the baseline is ignored. ccfingerprint ships no reference fingerprints for any model. You make the baseline yourself from the official endpoint.
Compare several relays:
ccfp compare relay-a.json relay-b.json relay-c.json --baseline official.json --lang en
What the API signals mean:
| Signal | Meaning |
|---|---|
Returned model field names another model |
Strong substitution signal. Many relays rewrite this field to echo the request, so a match proves nothing |
| Same request, different prompt-token counts | More than one backend (rotating routing, or load-balancing across providers) |
| Constant +N tokens vs the official baseline | The relay injects a hidden system prompt or rewrites requests |
| Varying difference vs the official baseline | Different tokenizer: almost certainly a different model |
<think> tags under a Claude / GPT / Gemini name |
Typical output of DeepSeek / Qwen-style open models |
Anthropic endpoint returns ids other than msg_… |
The relay converts another protocol into Messages format (shown as a note, no penalty) |
One request per probe: about 31 for the full set, 17 with --quick, plus 3 tiny canary requests (--canary 0 turns them off). --runs N multiplies the request count by N.
🧠 Downgrade check (ccfp iq)
export CCFP_API_KEY=sk-...
ccfp iq --base-url https://relay.example.com/v1 --model gpt-5.5
ccfp iq --base-url https://api.openai.com/v1 --model gpt-5.5 --seed 123456 --report official-iq.json # official baseline
ccfp iq --base-url https://relay.example.com/v1 --model gpt-5.5 --seed 123456 --baseline official-iq.json
A "downgrade" is usually one of the following, and each has a signal ccfp iq measures:
| Downgrade | How it is measured |
|---|---|
| A smaller / cheaper model | Reasoning tasks at three levels (big multiplication, letter counting, list operations, modular powers, CRT, code tracing, knights and knaves, inclusion–exclusion, sorting, base conversion, date arithmetic), generated fresh from a random seed on every run and graded exactly by the script, so they cannot be memorised or answered from a cache. A frontier model that fails the hard tasks or misses easy ones is flagged |
| Reasoning effort lowered or switched off (the usual GPT case) | usage.completion_tokens_details.reasoning_tokens: a reasoning model that reports ~0, or far fewer than the official baseline |
| Requests split across channels | No text costs more than ~1.2 tokens per character, so a request billed thousands of extra prompt tokens carries a hidden prompt. Some requests with it and some without = requests are split between channels (the pass rates of both groups are compared) |
| Truncated long context | Codes hidden at the start, middle and end of a prompt of a set size (default 32k tokens); losing the start, or far fewer billed tokens than sent = truncated; far more = inflated billing |
| Capped output | --long-output: asks for 1..1500 and flags a length stop (a model that abbreviates on its own is only noted) |
| Intermittent downgrades | --rounds 3 compares rounds; --history or ccfp watch tracks the score, reasoning tokens and long context over time |
- Strongest against the official API: run the same
--seedon the official endpoint and on the relay, then--baselinecompares score, hard-task pass rate, reasoning tokens, long context and output speed. Without a baseline, absolute judgments are made only for frontier model names (GPT-5 and later, o-series, Claude, Gemini 2.5 Pro / 3, Grok 4, DeepSeek, Qwen 3 …); light models (mini, nano, flash, haiku …) are only recorded. - Size:
--level quick12 tasks,standard23 (default),full46, plus one long-context request (--context 0to skip,--context 128kto change the size). - Reasoning settings:
--reasoning-effort high(OpenAI protocol, sendsreasoning_effort),--thinking-budget 8000(Anthropic protocol, extended thinking). Otherwise the endpoint's defaults apply. - Chat apps (e.g. the ChatGPT web app):
ccfp iq --sheetwrites the sheet and prints the seed; paste it, save the whole reply, thenccfp iq --grade reply.txt --seed <seed> --model <the model you picked>. Without token data only accuracy is scored; ask it not to use code tools. - Output:
ccfp-iq.json(raw; re-score with--from),ccfp-iq.md, optional--html/--json;--fail-under 70and--fail-on-downgradefor CI. - A single run has sampling noise; one or two tasks prove nothing. The strong findings are the hard evidence.
📈 Monitor several relays (ccfp run / ccfp watch)
Put the endpoints in a JSON file, for example ccfp.config.json:
{
"lang": "en",
"quick": true,
"model": "claude-opus-5-5",
"baseline": "official",
"out_dir": "ccfp-runs",
"endpoints": [
{ "name": "official", "base_url": "https://api.anthropic.com", "api": "anthropic", "api_key_env": "ANTHROPIC_API_KEY" },
{ "name": "relay-a", "base_url": "https://relay-a.example.com", "api": "anthropic", "api_key_env": "RELAY_A_KEY" },
{ "name": "relay-b", "base_url": "https://relay-b.example.com/v1", "api_key_env": "RELAY_B_KEY" }
]
}
ccfp run --config ccfp.config.json # probe all endpoints once
ccfp watch --config ccfp.config.json --every 6h # repeat every 6 hours until stopped (Ctrl+C)
ccfp history ccfp-runs/history.jsonl --html history.html
- Top-level keys apply to every endpoint; an endpoint can override any of them. Keys are the
ccfp probeoptions in snake_case or camelCase:base_url,model,api,api_key_env,quick,runs,canary,concurrency,timeout,max_tokens,temperature,lang,baseline. "iq": true(or{"level": "standard", "context": 32000, "long_output": true, "reasoning_effort": "high"}) also runsccfp iqon each endpoint (quick by default). Every endpoint in a run gets the same tasks and is compared with itsbaselineendpoint; outputs<name>.iq.json/.md/.html, history iniq-history.jsonl, and a downgrade table in the summary.baselineis either the name of another endpoint in the same file (it is probed first) or the path of a saved report. Prompt tokens are only compared between endpoints on the same protocol (relay-babove is compared on capability and knowledge only).- Run settings:
out_dir(defaultccfp-runs),history(default<out_dir>/history.jsonl),html(defaulttrue),fail_under,fail_on_drift. - Output in
out_dir:<name>.json(raw report),<name>.md/<name>.html(verdict),summary.md/summary.html(all endpoints side by side, plus what changed),history.jsonl. - An endpoint whose key is missing is skipped and listed in the summary; the others still run (exit code 1 at the end).
- Prefer the system scheduler over a long-running
watch? Runccfp run --config ccfp.config.json --fail-on-driftfrom cron or Task Scheduler. A single endpoint works too:ccfp probe … --history history.jsonl --fail-on-drift.
What counts as a change since the previous run of the same endpoint:
| Change | Strength |
|---|---|
| Canary prompt-token count differs (same language, dataset and protocol) | strong: new tokenizer or a new hidden system prompt |
A model field that was never returned before |
strong |
| Self-declared identity changed | strong |
| Mixed / rotating routing appeared | strong |
| Verdict got worse (trustworthy → questionable → not trustworthy) | strong |
| Confidence fell by 15+ points | soft |
| Capability pass-rate fell by 25+ points | soft |
| Demonstrated knowledge moved 6+ months back | soft |
The thresholds sit above the normal noise of a probe run, so one unlucky answer does not raise an alarm. ccfp history --fail-on-drift only looks at the latest run of each endpoint, so an old incident does not keep CI red.
🤖 Use in CI
ccfp verify ccfp-report.json --json --fail-under 75
ccfp probe --base-url "$RELAY_URL" --model claude-sonnet-5-5 --quick --json --fail-under 75
Exit codes: 0 ok; 1 bad arguments or files; 2 confidence below --fail-under, or a change since the previous run with --fail-on-drift. --json prints the verdict (level, score, flags, API signals) as JSON on stdout; the Markdown is still written to --output.
📋 Commands
| Command | Description |
|---|---|
ccfp init --ai <type> |
Install the /fingerprint command |
ccfp verify [report] |
Score ccfp-report.json locally (defaults to current dir) |
ccfp probe --base-url <url> --model <id> |
Probe an API endpoint directly and score it |
ccfp compare <reports...> |
Compare several reports side by side |
ccfp run --config <file> |
Probe every endpoint in a config file, compare, record history |
ccfp watch --config <file> --every <interval> |
run on a timer (30m, 6h, 1d) |
ccfp history [file] |
Show the history and what changed between runs |
ccfp iq --base-url <url> --model <id> |
Downgrade check (options: ccfp iq --help and above) |
ccfp iq --sheet / --grade <reply> |
Downgrade check for chat apps: write a sheet / grade the reply |
All options
| Option | Commands | Description | Default |
|---|---|---|---|
--ai <type> |
init | Target assistant (see table below) or all |
claude |
--lang <language> |
all | Language (zh, en) | zh |
--output <path> |
all | init: output dir; others: Markdown verdict file | . / ccfp-verdict.md / ccfp-compare.md |
--force |
init | Overwrite a target file not generated by ccfingerprint | off |
--quick |
init, probe | Quick probe set (about half the probes) | off |
--json |
verify, probe, compare, run, watch, history | Print the verdict as JSON | off |
--fail-under <score> |
verify, probe, compare, run, watch | Exit with code 2 below this confidence | - |
--baseline <report> |
verify, probe, compare | Baseline report made against the official API | - |
--api <protocol> |
probe | openai or anthropic |
openai |
--api-key-env <name> |
probe | Environment variable holding the API key | CCFP_API_KEY |
--runs <n> |
probe | Repeat the probe set n times | 1 |
--canary <n> |
probe | Identical short requests used to check token stability | 3 |
--concurrency <n> |
probe | Parallel requests | 4 |
--max-tokens <n> / --temperature <t> |
probe | Anthropic sends 2048 by default, OpenAI sends none; temperature is not sent by default | - |
--timeout <s> |
probe | Per-request timeout in seconds | 120 |
--report <path> |
probe | Where to save the raw report | ccfp-report.json |
--html <path> |
verify, probe, compare, history | Also write a self-contained HTML report | - |
--history <file> |
probe, run, watch | JSONL history file; flags changes since the previous run | run: <out_dir>/history.jsonl |
--fail-on-drift |
probe, run, watch, history | Exit with code 2 if an endpoint changed since its previous run | off |
--config <file> |
run, watch | Endpoint config (JSON) | - |
--out-dir <dir> |
run, watch | Where reports go | ccfp-runs |
--every <interval> / --times <n> |
watch | Interval between rounds / stop after n rounds | - / until stopped |
--last <n> |
history | Rows per endpoint | 20 |
🧩 Supported AI Assistants
--ai |
Assistant | Generated file | Invoke |
|---|---|---|---|
claude |
Claude Code | .claude/skills/fingerprint/SKILL.md |
/fingerprint |
codex |
OpenAI Codex | .agents/skills/fingerprint/SKILL.md (+ agents/openai.yaml) |
$fingerprint |
cursor |
Cursor | .cursor/skills/fingerprint/SKILL.md |
/fingerprint |
copilot |
GitHub Copilot (VS Code) | .github/prompts/fingerprint.prompt.md (agent mode) |
/fingerprint |
windsurf |
Windsurf / Devin Desktop | .windsurf/workflows/fingerprint.md |
/fingerprint |
cline |
Cline | .cline/skills/fingerprint/SKILL.md |
/fingerprint |
kiro |
Kiro | .kiro/skills/fingerprint/SKILL.md |
/fingerprint |
augment |
Augment Code | .augment/commands/fingerprint.md |
/fingerprint |
trae |
Trae | .trae/commands/fingerprint.md |
/fingerprint |
opencode |
OpenCode | .opencode/commands/fingerprint.md |
/fingerprint |
qwen |
Qwen Code | .qwen/commands/fingerprint.md |
/fingerprint |
roo |
Roo Code | .roo/commands/fingerprint.md |
/fingerprint |
antigravity |
Google Antigravity | .agents/skills/fingerprint/SKILL.md |
/fingerprint |
gemini |
Gemini CLI (enterprise) | .gemini/commands/fingerprint.toml |
/fingerprint |
Skill files set disable-model-invocation: true, so the probe only runs when you ask for it. Codex ignores that key, so the description says "run only when the user invokes it"; agents/openai.yaml carries only the display name and no longer sets policy.allow_implicit_invocation: false, which made Codex hide the skill (see #2). With codex exec in a shell, use single quotes (codex exec '$fingerprint'), otherwise the shell expands $fingerprint to an empty string.
🆕 Changelog
v2.6
ccfp iq: a dedicated downgrade check.probeasks "is this the model it claims to be?";iqasks "is it running at full strength right now?". It catches a smaller model behind the same name, reasoning effort turned down or off, a truncated long context, a capped output, and requests split onto channels that add a hidden prompt. See Downgrade check.- Works for chat apps too:
ccfp iq --sheetwrites a task sheet to paste into the ChatGPT web app (or any app without an API);--gradescores the reply. "iq": truein accfp run/ccfp watchconfig checks every endpoint on a schedule, keepsiq-history.jsonl, and flags an endpoint that got worse.- Fix #2 (v2.5.1): the
agents/openai.yamlwritten byccfp init --ai codexmade Codex hide the skill.
v2.5: many endpoints at once, long-term monitoring, HTML reports
- Many endpoints in one run:
ccfp run --config ccfp.config.json. List your relays (and the official API) in one JSON file. ccfp probes each of them, compares every relay with the official endpoint probed in the same run, and writes one report per endpoint plus a side-by-side summary. Keys stay in environment variables: a config file that contains a key is refused. - Catch silent swaps over time:
ccfp watch --every 6h,--history,ccfp history. Every run appends one line per endpoint to a history file. When an endpoint changes between runs (a different canary token count, a newmodelfield, a different self-declared identity, rotating routing appearing, a worse verdict, a capability drop of 25+ points, knowledge that moved 6+ months back), ccfp says what changed, and--fail-on-driftexits with code 2 so cron or CI can alert you. - Shareable HTML reports.
--html report.htmlonverify,probe,compareandhistory(and by default inrun) writes one self-contained page: verdict badge, tables, light/dark mode, no external files. Send it to the relay seller or drop it in a group chat. - Claude 5 family pinned by tests:
claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5andclaude-fable-5-2are recognised in the forms vendors and relays use (dated suffixes,anthropic/…, Bedrockus.anthropic.…-v1:0,[1m]).
v2.4: ccfp probe tests API relays directly
ccfp probe: test an API relay directly. No assistant needed. It sends the probes to an OpenAI-compatible endpoint (/v1/chat/completions) or an Anthropic endpoint (/v1/messages), one fresh request per probe with no tools, and scores the answers locally. It also checks signals from the API itself: the returnedmodelfield, prompt-token counts,<think>tags and response id format.- Mixed / rotating routing detection. One backend always reports the same prompt-token count for the same request. If the count changes, there is more than one model or tokenizer behind the endpoint.
--runs Nrepeats the whole probe set N times, judges by the worst run, and compares self-declared identity and capability between runs. - Official baseline comparison. Run the probe once against the official API, save it, then pass it to
--baselinewhen testing a relay. Identical token counts = same tokenizer. A constant extra N tokens = the relay injects a hidden system prompt. A varying difference = a different model. - Multi-endpoint comparison.
ccfp compare a.json b.json …puts several relays side by side in one table. - CI-friendly.
--jsonprints a machine-readable verdict;--fail-under 75exits with code 2 below that score. - Quick mode.
--quick(for bothprobeandinit) uses about half the probes (17 requests instead of 31) and keeps all three difficulty tiers. - Identity table updated to November 2026: Claude Fable 5.2 (released 2026-11, official cutoff 2026-06), Mythos 5.x, Gemini 3.7/3.8, Grok 4.7, DeepSeek V4.1, Qwen 3.8, Kimi K3.1, GLM-5.2/5.3, MiniMax M3/M3.1. In v2.3,
claude-fable-5-2matched no identity at all.
v2.3: a real /fingerprint command in 14 assistants
- Real
/fingerprintcommands for 14 assistants. Assistants have converged on Agent Skills / command files, so every target now gets a dedicated, on-demand command instead of an always-on rules file. Older versions wrote intoAGENTS.md,.windsurfrules,.clinerulesandcopilot-instructions.md, which injected the probe into every chat and overwrote those files;initnow warns if such leftovers exist. - Never overwrites your files — a target file that ccfingerprint did not generate is left alone unless you pass
--force. - Knowledge anchors refreshed to October 2026 (Claude 5 / 5.5, GPT-6, Qwen3.8-Max, 2026 Nobel prizes …).
- Fixed identity check — models are trained before they are released, so asking a model about its own release date proved nothing and flagged genuine flagships. v2.3 instead checks that a model claiming identity X knows events that happened well before X's official knowledge cutoff.
- Robust date scoring —
2025-08-07,Aug 2025,7 August 2025and2025年8月are all understood (±1 month), and a right-year-wrong-month answer counts as "roughly known" instead of fabrication. - Harder capability probes — 2026 small models ace bat-and-ball and letter counting, so the battery now includes code tracing, calendar arithmetic, knights-and-knaves, inclusion–exclusion and a Chinese-remainder puzzle. Running code or tools to solve them is forbidden by the prompt.
Full history: CHANGELOG.md.
🛠️ Updating the probe set
Everything lives in src/dataset.json:
knowledge— dated probes (date+check); use{"month": "YYYY-MM"}for "when was X released" questions.identities— model-ID patterns with their release month and, when published, the official knowledge cutoff. Leavecutoffout when the vendor has not published one; the check then counts back from the release month."quick": trueon a probe puts it in the quick probe set.
As model cutoffs advance, add new anchors and identities — no code changes needed. Answer keys are used only by ccfp verify and never rendered into the prompt the model sees.
⭐ Star History
📄 License
MIT
Explore related projects
Loading…