Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

docs(i18n): document the split-token lever and why repair had to start batching

nirholasd2a5699b0345
diff --git a/docs/i18n.md b/docs/i18n.md
index d611a6563..9b96d2ccb 100644
--- a/docs/i18n.md
+++ b/docs/i18n.md
@@ -79,6 +79,7 @@ npm run i18n:translate -- --locale=es # one locale
npm run i18n:translate -- --force # retranslate everything
npm run i18n:translate -- --dry-run # show what would translate (also refreshes manifest)
npm run i18n:translate -- --concurrency=8 # widen the chunk pool for a bulk run
+npm run i18n:translate -- --split-token=3600 # bigger chunks, fewer requests
npm run i18n # extract + translate
```
@@ -90,6 +91,15 @@ key that already powers `/chat` works here too. `.env` and `.env.local` are read
automatically - an exported variable still wins, so a one-off
`GEMINI_API_KEY=… npm run i18n:translate` overrides the file.
+`--split-token=` overrides the chunk budget for one run. It is the only lever
+that changes the **request** count for a fixed amount of text, which matters
+because the free lanes meter requests per day, not tokens: doubling the budget
+halves the requests and leaves the token spend unchanged. A 668-key backlog
+across 84 locales is ~840 requests at the committed budget and ~570 at
+`--split-token=3600`, against a free-tier ceiling of 1000 requests/day. Raise it
+on a lane whose model holds a long JSON reply together; leave it alone on the
+weak free models, where small chunks truncate less.
+
| provider | free? | credentials | notes |
| ------------------ | ------- | -------------------------------------- | ----------------------------------------------------------- |
| `vertex` (default) | credits | `GOOGLE_CLOUD_PROJECT` + GCP auth | billed to the platform's GCP credits; no free-tier quota wall |
@@ -238,12 +248,22 @@ Glossary terms, `{{placeholders}}`, tags, and entities are masked to sentinels
the model must reproduce verbatim. A small model occasionally omits a sentinel
mid-sentence, so the term never gets restored and the key fails lint. `--repair`
re-translates **only** the lint-failing keys (dropped glossary term, placeholder
-drift, or markup drift), one at a time, retrying each until it passes its own
-integrity check. A key that never converges after four attempts is baked to
+drift, or markup drift): first all of them together in normal-sized chunks, then
+one at a time for whatever the batch got wrong, retrying each until it passes its
+own integrity check. A key that never converges after four attempts is baked to
English (lint-clean, and the runtime already falls back to English for anything
missing). Idempotent: a clean catalog reports `nothing to repair`. Takes the same
`--provider=` / `--model=` overrides as `i18n:translate`.
+The batched first pass is what makes repair finishable. One request per key is
+fine for the stray sentinel drop repair was written for, but the failure that
+actually fills the list is an **English string edited after the locales were
+translated**: `i18n:translate` only fills keys that are missing, never keys whose
+source changed under them, so the stale translation sits there until lint notices
+the glossary term or the markup no longer matches. That fails the same key in
+every locale at once, and 11 such keys is 924 single-key requests, more than a
+free lane's entire daily budget.
+
### Backfill (find copy that silently stayed in English)
```bash