`prepare_workspace_execution_env()` sets LANG / PYTHONUNBUFFERED /
PYTHONDONTWRITEBYTECODE but never PYTHONUTF8, and the restricted subprocess
backend deliberately inherits only a fixed subset of host variables. On a
Windows host whose ANSI code page is not UTF-8 (cp936, cp1252, …) the model's
Python therefore ran with `locale.getpreferredencoding() == 'cp936'`.
Two symptoms follow, and they hit any skill or tool script that touches
non-ASCII text:
* a bare `Path.read_text()` / `open()` on a UTF-8 file raises
`UnicodeDecodeError: 'gbk' codec can't decode byte 0x8d in position 146`
(or silently mojibakes the content);
* `print()` of a non-ASCII value reaches the caller as GBK bytes, which the
turn reads back as garbage.
Reproduced end to end with a workspace skill whose build script reads a UTF-8
HTML template: under the exec environment it failed on every invocation, while
the same script succeeded in an ordinary shell on the same host — the classic
environment-dependent failure that is hardest for a user to diagnose. Measured
in the exec environment (same interpreter): `PYTHONUTF8` unset →
`stdout=gbk files=cp936`; set → `stdout=utf-8 files=utf-8`.
One variable fixes both halves, because UTF-8 mode covers file I/O and stdio
together. It is a no-op where UTF-8 is already the locale default, so Linux and
macOS containers behave exactly as before.
The authoring finish guard makes the loop discard the reply written this
round, so entering the flow from the two keyword lists was enough to
delete a response the user never asked to replace — and to fail the turn
outright on the salvage path. Distinguish how a turn got here and keep
the coercion for the flow the user selected deliberately.
The authoring gate matched an action word and a Partner word anywhere in
the message, so turns that only mention a Partner ("I want to file an
issue about the Partner bug", "the release notes mention Partner
channels", "I need help understanding my tutor's feedback") activated the
capability, and finish_instruction then forced a propose_partner draft
the user never asked for.
Require the action to lead into the Partner object within one clause
(e.g. "create a Socratic tutor", "帮我创建一个学习伙伴"), and stop the
Chinese match at words that make the Partner a topic (关于/有关/提到/讨论).
Closes#1587
Adds `de` alongside en/zh/fr/uk, following the seams the Ukrainian locale
established: the interface-language normalizers (settings + launcher), the
Settings language list, APP_LANGUAGES / normalizeLanguage, the lazy bundle
loader, the date locale, the CLI banner labels, the quiz-judge prompt and
the i18n audit's required locales. German already existed as a reply
language; this makes it selectable for the UI as well.
`web/locales/de/app.json` covers all 5200 English keys (audit: 3850/3850
used keys, strict). `language.german` is added to every catalog.
Tests: `tests/i18n/test_german_locale.py` pins each seam, and
`web/tests/german-locale-quality.test.ts` guards terminology (informal
"du", one term per concept, no context-free machine translations such as
"Lappen" for RAG). Three existing tests used `de` as their example of an
unsupported language; they now use `xx`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Google's model list returns resource names such as
"models/gemini-2.5-flash", but every MODEL_OVERRIDES key is a bare id and
_static_capability() matched with startswith(), so the "gemini" rule never
fired for a catalog-supplied id. Resolution fell through to the binding
default, and for OpenAI-compatible bindings that default is no vision, so a
model card left on Vision: Auto reported the model as text-only and dropped
it from LightRAG's VLM selection. Declaring Vision explicitly hid the
problem, which is why it looked like a UI restriction.
Normalize the same prefix the embedding layer already strips
(services/config/embedding_endpoint.py and
services/embedding/adapters/gemini.py) before matching, so both spellings
resolve identically. User-declared catalog overrides are untouched: they are
keyed by the exact id the user typed.
Closes#1579
_request_json used a fixed two-attempt loop, so with N configured keys
only the first two were ever tried before MinerUError was raised after
consecutive 429s. Follow the #1499 retry-budget semantics used by the
LLM/embedding paths: attempts = max(2, len(key_pool)).
Behavior is unchanged for single- and two-key setups; pools with three
or more keys can now actually rotate past two rate-limited keys.