Skip to content

AI Backends

BuildBot edited this page Jun 12, 2026 · 1 revision

AI Backends

Ollama (local)

Runs entirely on your machine. No internet required after setup.

Translation model — translategemma3-st

Fine-tuned Gemma 3 27B on EN→UK Starfield string pairs.

ollama pull 0xra/bethesda-translate
# or build from local GGUF:
ollama create translategemma3-st -f Modelfile

Quality-check model — qcgemma4-st

Fine-tuned Gemma 4 E4B on 14,928 QC examples covering 16 issue codes. Runs after each translation when AI QC is enabled.

ollama pull 0xra/bethesda-qc
# or build from local GGUF:
ollama create qcgemma4-st -f Modelfile.qc

Output format: VERDICT: GOOD or VERDICT: ISSUES_FOUND followed by CODES, SEVERITY, DETAILS, and ACTION: AUTOFIX|RETRANSLATE.

Parallel workers

The Ollama backend uses a ThreadPoolExecutor (default 10 workers) to call the HTTP API in parallel. Adjust via Settings → Workers.

Claude API (cloud)

Requires an Anthropic API key. Select in Settings → Backend → Claude.

Model Speed Cost Best for
Haiku 4.5 Fastest Lowest Large batches
Sonnet 4.6 Balanced Medium Default
Opus 4.8 Slowest Highest Difficult strings

The API key is stored in the system keyring (or AES-256-GCM encrypted file), never in the config JSON.

Translation pipeline

Each string goes through this pipeline regardless of backend:

  1. TermProtector.protect() — replaces protected terms with placeholder tokens
  2. Model API call (Ollama or Claude)
  3. TermProtector.restore() — restores protected terms
  4. _restore_dropped_tags() — re-inserts any Bethesda game tags the model dropped (<mag>, <dur>, <area>, <Alias=…>, [PLYR], etc.) using fractional-position heuristics
  5. QualityChecker — runs rule-based QC checks
  6. Optionally: AI QC model (qcgemma4-st)

Clone this wiki locally