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.

fix(i18n): default the Groq translate lane to qwen/qwen3.8-27b, a model Groq still serves

nirholasd0f17962bb22
diff --git a/docs/i18n.md b/docs/i18n.md
index ad1fa0aa8..d611a6563 100644
--- a/docs/i18n.md
+++ b/docs/i18n.md
@@ -94,7 +94,7 @@ automatically - an exported variable still wins, so a one-off
| ------------------ | ------- | -------------------------------------- | ----------------------------------------------------------- |
| `vertex` (default) | credits | `GOOGLE_CLOUD_PROJECT` + GCP auth | billed to the platform's GCP credits; no free-tier quota wall |
| `gemini` | ✅ free | `GEMINI_API_KEY` / `GOOGLE_API_KEY` | <https://aistudio.google.com/apikey> - free tier, best CJK |
-| `groq` | ✅ free | `GROQ_API_KEY` | <https://console.groq.com/keys> - Llama 3.3 70B, fast |
+| `groq` | ✅ free | `GROQ_API_KEY` | <https://console.groq.com/keys> - fast; the script defaults to `qwen/qwen3.8-27b` (the model `/chat` uses on this lane since Groq retired `llama-3.3-70b-versatile` in August 2026); pass `--model=` to override |
| `openrouter` | ✅ free | `OPENROUTER_API_KEY` | <https://openrouter.ai/keys> - use a `:free` model |
| `nvidia` | ✅ free | `NVIDIA_API_KEY` | <https://build.nvidia.com> - free NIM credits |
| `openai` | paid | `OPENAI_API_KEY` (+ `OPENAI_BASE_URL`) | any OpenAI-compatible endpoint |
@@ -147,15 +147,17 @@ billing account. `402` is the balance. `401` really is the credential.
`i18n:backfill` (below) exists to clean up catalogs damaged by this before the
guard existed.
-> **Quality note:** Llama 3.3 70B (Groq) is solid for Latin-script languages. For
+> **Quality note:** the Groq lane is fast and solid for Latin-script languages. For
> CJK/Arabic/Hindi, Gemini (free tier or Vertex) is noticeably better - switch per
> run with no code change. Whatever you pick, `npm run i18n:lint` catches any model
> that drops a placeholder, a glossary term, or a tag.
### Glossary lock (the important part)
-Terms in `doNotTranslate` — `$THREE`, the contract address, `x402`, `USDC`,
-`Solana`, `IBM watsonx.ai`, etc. - plus every `{{placeholder}}`, HTML tag, and
+Terms in `doNotTranslate` (`$THREE`, the contract address, `x402`, `USDC`,
+`Solana`, `IBM watsonx.ai`, the official handles and channels such as
+`@trythreews`, `t.me/three_ws`, `[email protected]`, and so on) plus every
+`{{placeholder}}`, HTML tag, and
HTML entity are **masked to opaque sentinels before the text reaches the model
and restored after**. The model literally never sees them, so they come back
byte-for-byte and can never be translated, reordered, or hallucinated around.
@@ -296,6 +298,13 @@ default), fetches `/locales/<code>.json` once, rewrites the annotated DOM, sets
fall back to English, so partial locales degrade gracefully. `window.threewsI18n`
exposes `{ t, setLocale, getLocale, initI18n }`.
+An annotated element whose content becomes live data (a balance, a status, a
+count) sets `data-i18n-owned="1"` the moment its script writes a real value into
+it. The annotation still ships so the pre-render placeholder is translated, but
+from then on the catalog pass skips the element: without that, the pass (which
+lands after the async catalog fetch) reverted a freshly rendered value back to
+its translated "Loading" placeholder.
+
The `<lang-switcher>` reads `public/locales/manifest.json`, which lists only
locales whose catalog is **complete**, so it never offers a language that would
fall back to English. Presence of the file is not enough: `writeManifest()` counts
@@ -309,6 +318,15 @@ that still has them, reporting what it skipped:
So a locale that is mid-translation is simply absent from the switcher until the
run finishes, instead of shipping as a half-translated page.
+The switcher shrinks where space is tight. Below the 640px breakpoint, or on any
+page that sets a `compact` attribute on `<lang-switcher>` (a narrow HUD rail),
+the control shows the locale code (`shortLocaleLabel()`: `EN`, `PT`, `ZH`) in
+place of the full language name, which otherwise makes a ~170px control. The
+native `<select>` still owns the interaction and keeps the full names in its
+options, so the picker, keyboard and screen readers behave exactly as before; the
+host also accepts a `max-width` and follows it instead of pushing its siblings
+off screen.
+
## Adding a language
Add the code (and display name) to `outputLocales` / `localeNames` in
diff --git a/scripts/i18n-translate.mjs b/scripts/i18n-translate.mjs
index 07ad12cb3..cb9c3f6e7 100644
--- a/scripts/i18n-translate.mjs
+++ b/scripts/i18n-translate.mjs
@@ -200,7 +200,7 @@ function chunkKeys(keys, budgetChars) {
const PROVIDER_DEFAULT_MODEL = {
gemini: 'gemini-2.5-flash',
vertex: 'google/gemini-2.5-flash',
- groq: 'llama-3.3-70b-versatile',
+ groq: 'qwen/qwen3.8-27b',
openrouter: 'openai/gpt-oss-20b:free',
nvidia: 'meta/llama-3.3-70b-instruct',
mistral: 'mistral-small-latest',