A userscript for finding translation term inconsistencies in WTR Lab chapters. It supports Google Gemini and OpenAI-compatible providers, can rotate multiple API keys, can reuse live terms from WTR Lab Term Replacer, and includes shareable debug reports for issue reporting.
- AI-assisted inconsistency detection with Gemini or OpenAI-compatible APIs.
- Simple provider setup using provider type, base URL, API keys, and model selection.
- Automatic OpenAI-compatible endpoint handling for common bases such as OpenAI, Ollama, OpenRouter, Groq, Together, DeepSeek, and Gemini OpenAI compatibility.
- Advanced endpoint path overrides hidden behind troubleshooting controls for non-standard providers.
- Enriched OpenAI-compatible model catalog support, including optional metadata for context length, output limits, pricing, capabilities, supported parameters, and latest-alias targets.
- Automatic high-reasoning request behavior that sends reasoning/thinking parameters only when the model or provider supports them, with temperature set to 1 when supported and omitted when rejected.
- Dynamic prompt scaling that adjusts glossary and verification context caps based on the selected model's context length metadata.
- Precise replacement targeting so each variation identifies the exact substring to replace from the actual chapter text instead of replacing full evidence phrases.
- Evidence chain reasoning and confidence scoring in AI findings with a collapsible Decision Guide section, with low-confidence actionable results downgraded to Needs Review.
- Multiple API keys with rotation, cooldown state, saved configuration migration, and a show/hide API key toggle in the modal.
- Deep analysis carries findings forward between iterations, verifies them in later passes, and downgrades uncertain findings to Needs Review instead of silently dropping or over-confirming them.
- Session persistence for continuing analysis later.
- Optional live sync with WTR Lab Term Replacer terms and optional JSON import fallback.
- Optional WTR Lab reader API source mode for directly fetching nearby or custom chapter ranges without relying only on loaded page content.
- Optional WTR Lab advisory glossary context with compact relevance filtering. The AI prioritizes story context, chapter evidence, and world-building consistency over glossary wording.
- Debug logging mode with copy-ready, redacted Markdown reports for easier issue reporting.
- Responsive modal UI for desktop and mobile.
- Modern WTR Lab UI support: automatically detects and works with both the legacy Bootstrap bottom navigation and the modern Shadcn/Tailwind tab bar.
- Dark mode support: UI automatically adapts when the site switches to dark theme.
- Settings tab integration: "Analyze Inconsistencies" button appears in the Settings tab panel as well as in the bottom navigation bar.
- Install a userscript manager. Recommended: Violentmonkey, Stay, or ScriptCat. Tampermonkey is also supported for compatibility but is not the recommended choice.
- Install the script from Greasy Fork.
- Open a WTR Lab chapter and click the Finder control.
- In Configuration, choose Gemini or OpenAI-Compatible, enter your API key, set the base URL, refresh models, select a model, and save.
For OpenAI-compatible providers, enter the base URL only. Examples: https://api.openai.com/v1, http://localhost:11434/v1, https://openrouter.ai/api/v1, or https://api.groq.com/openai/v1. Manual chat/models paths are available only in Advanced endpoint troubleshooting.
- Open the Finder panel on a WTR Lab chapter.
- On the modern UI: click the Analyze Inconsistencies button in the bottom navigation bar (beside Settings) or open the Settings tab and click Analyze Inconsistencies there.
- On the legacy UI: click the Analyze Inconsistencies button in the bottom reader nav.
- Configure provider, API keys, and model. Reasoning and temperature are handled automatically.
- Use Show Keys only when you need to inspect or edit saved API key values.
- Choose the chapter source in the Finder tab:
- Loaded page chapters analyzes chapters already present in the page DOM.
- WTR Lab reader API can fetch the current chapter with nearby chapters or a custom chapter range.
- Choose whether to use WTR Lab advisory glossary context and live Term Replacer sync when available.
- Start analysis from the Finder tab.
- Review results, including Verified and Needs Review badges, then filter by priority/status and apply through Term Replacer or copy suggestions.
The Finder supports two chapter sources:
- Loaded page chapters: Uses chapter text already rendered on the WTR Lab page. This is the safest fallback and matches earlier behavior.
- WTR Lab reader API: Fetches chapter text directly from WTR Lab for the current, nearby, or custom chapter range. The script resolves WTR glossary placeholders such as
※8⛬before sending text to the AI.
When Use WTR Lab Glossary Context is enabled, the script fetches the novel's WTR glossary, caches it locally, and injects only relevant compact context into the prompt. The AI treats this as advisory context only and prioritizes story context, chapter evidence, and world-building consistency over glossary wording. Glossary entries alone do not create findings unless the analyzed chapter text supports them.
When reporting an issue:
- Open Configuration and enable Debug Logging.
- Reproduce the issue.
- Click Copy Debug Report.
- Paste the copied Markdown report into a GitHub issue or Greasy Fork feedback thread.
The report includes runtime details, provider/model configuration, iteration state, result count, and timestamped debug logs. API keys and common token formats are redacted before copying.
- Node.js 20.19.0 or newer
- npm
- A userscript manager for browser testing
npm installnpm run buildWebpack compiles TypeScript source and CSS into JavaScript userscript bundles in dist/:
dist/wtr-lab-term-inconsistency-finder.user.jsdist/wtr-lab-term-inconsistency-finder.greasyfork.user.jsdist/wtr-lab-term-inconsistency-finder.dev.user.js
npm run typechecksrc/
index.ts
modules/
analysisEngine.ts
promptBudget.ts
promptManager.ts
providerConfig.ts
state.ts
wtrLabApi.ts
ui/
styles/
dist/
generated userscript output
MIT. See LICENSE.
