ModelTrace README

The project's README from github.com/xqy2006/ModelTrace. As one markdown file: README.md.

ModelTrace

ModelTrace 是一个本地运行的主动模型归因工具。它通过三条独立的长整数生成挑战提取多视角输出指纹,在统一候选库中自动判断模型家族和具体版本,并对未收录的库外模型自动拒绝归因。

运行

Python 后端版

python -m pip install -r requirements.txt
python start.py

页面地址为 http://127.0.0.1:7860/。

纯静态浏览器本地版(GitHub Pages)

static/index.html 是不依赖后端的手动测试版本,特征提取、归因计算和指纹库读取都在浏览器本地完成:

python -m http.server 8080 -d static

使用

API Key 只用于当前页面发起请求,不写入磁盘。

指纹库覆盖范围(2 大家族 · 22 个模型)

gpt-5.4
gpt-5.5
gpt-5.6-sol
gpt-5.6-terra
gpt-5.6-luna
gpt-6-astra
gpt-6-sol
gpt-6-luna
gpt-6.1-sol
gpt-6.1-terra
gpt-6.2-astra
gpt-6.2-sol
claude-haiku-4-5-20251001
claude-haiku-5-5
claude-sonnet-4-6
claude-sonnet-5
claude-sonnet-5-5
claude-opus-4-6
claude-opus-4-7
claude-opus-4-8
claude-opus-5
claude-opus-5-5

GPT 采集自官方订阅 Codex,Claude 采集自 OAIPro。

项目结构

app.py                  Web 接口
v6_portable.py          双精度多视角特征提取与开集归因推理引擎
v6_builder.py           指纹库训练、校准与紧凑量化构建器
fingerprint.py          指纹归因入口与挑战生成
bank_builder.py         单库构建入口
challenge_suite.py      自动建库挑战套件
enrollment.py           API 调用与指纹采集
rebuild_unified_bank.py 重建统一全局库
data/                   参考数据与指纹库
static/                 纯静态页面与浏览器本地推理核心 (fingerprint-core.js)
templates/              页面模板

声明

测试结果仅供参考,并非判断模型的决定性证据。

若待测模型不在指纹库中或置信度不足,系统将拒绝归因。gpt-6.1-sol 与 gpt-6-astra 的输出分布非常接近,两者之间的分辨结果可能不准确(在高推理强度下尤为明显),请谨慎参考。Claude Code 的系统提示词会影响模型偏好,测试结果存在较大偏差,建议不要在 Claude Code 中测试。

致谢

感谢 hanlinwenyuan/hlwy-ai-checker。该项目较早将语言模型的随机数字生成偏差用于第三方 API 渠道一致性检查,为 ModelTrace 提供了重要参考。

LINUX DO

ModelTrace (xqy2006/ModelTrace)

Searching Database…

What is this?ModelTrace is a locally-run active model attribution tool: it sends three fixed challenge prompts to a target model, extracts an output fingerprint, and matches it against a known-model library to guess the model family and specific version.
Is this an app I install, or just a page I open?It's a static, backend-free web page (static/index.html, also deployed to GitHub Pages) plus an optional Codex plugin called ModelTrace Guard that runs background monitoring inside Codex sessions.
How do I run a test?Open the GitHub Pages site or static/index.html locally. For manual testing, copy the three challenge prompts to the target model and paste back its outputs; for automatic testing, enter the Base URL, API Key and model name and it handles the requests itself.
Do I need an API key to use it?Only for the automatic testing mode, which supports OpenAI Chat Completions and Anthropic Messages compatible endpoints. Manual testing needs no key at all — you just paste model outputs yourself.
Does it always correctly identify the model?No — results are only probabilities within the current fingerprint library, not proof. A model that isn't in the library will still be matched to whichever known model is closest, so an unfamiliar model can produce a confident-looking but wrong result. System prompts also skew results heavily, so testing inside Claude Code specifically is known to be unreliable.
Does it run only in a browser, or do I need to install anything?It runs entirely in the browser with no backend required for the manual/API modes; only the Codex Guard plugin needs to be installed inside Codex CLI.
What does the Codex plugin ModelTrace Guard actually do?It monitors a running Codex task in the background by periodically forking the frozen task snapshot to run normal and re-verification probes without blocking the main task, and silently logs consistent results while alerting and pausing the agent on repeated inconsistencies.
What's currently in the fingerprint library?Two model families covering 17 models total: GPT data collected from an official Codex subscription, and Claude data collected via OAIPro.
How does the attribution algorithm score a model?All models share one global feature space; the tool projects out an estimated interference direction, scores the three responses against every model center, averages the scores, and converts them to probabilities with a global softmax plus a calibration temperature.
What inspired this project?The author credits hanlinwenyuan/hlwy-ai-checker, an earlier project that used LLM random-number-generation bias to check third-party API channel consistency.
Creator
xqy2006
Size
9.4 MB
Stars
2.3K
Updated
CommitNov 25
Age
3mo
Commits · 90 Days