Repository navigation
docs: correct default-model guidance in deployment surfaces - #1097
NandhaKishorM merged 5 commits into
Conversation
The README shows Router(default="english") as the mostly-English override and then names LAYA_DEFAULT_MODEL=multilingual as "the same setting", which contradicts the example directly above it. The env-var spelling of default="english" is LAYA_DEFAULT_MODEL=english; the stock default stays multilingual, as the rest of the page says.
|
Merged in 0.4.3. Nine lines across five files, and the one I care about most is the README sentence that told a mostly non-English deployment to set The Verified on the merged tree: all 87 suites pass including Two other PRs this release correct the same fact on surfaces you did not touch, so between the three it is now consistent: #1085 for the Worth knowing why this mattered now: #1058 is an operator reporting a measured accuracy change across the 0.4.0 default move, and the contributor investigating it ended their analysis by pointing at exactly these stale tables. |
What
Five documentation surfaces still describe the pre-0.4.0 routing default, when
Routerfell back toenglishfor text with no language evidence. Since 0.4.0 the fallback ismultilingual, and an operator who wants English has to opt in explicitly. This corrects the guidance on the surfaces a deployer actually reads:README.md: theRouter(default="english")example introducedLAYA_DEFAULT_MODEL=multilingualas "the same setting", and the server paragraph told a mostly non-English deployment to setenglish. Both now match the code.compose.http.yaml: theLAYA_DEFAULT_MODELcomment said an empty value keepsenglishand advisedmultilingualfor mostly-non-English traffic. Empty keepsmultilingual;englishis the opt-in for mostly-English traffic.nix/laya-serve.nix: thedefaultModeloption description saidnullleaves theenglishdefault and reversed the override direction.laya/serve.py(_default_model_optiondocstring): quoted README advice that no longer exists; it now states the Router default and the opt-in.Text only; no code, API, or behavior change.
Why
laya/router.pyRouter.__init__defaults tomultilingualsince 0.4.0, andtests/test_serve.py(test_default_model_reaches_the_router_the_server_builds) pinsrouter.default == "multilingual". A deployer who follows the stale text gets the opposite checkpoint from the one they asked for, with no error to catch it — for example settingLAYA_DEFAULT_MODEL=englishto "restore" a documented default on a mostly-non-English deployment.How it was verified
Windows 11, Python 3.12.9.
Follow-ups
The full serve suite has one pre-existing environment failure (
test_accepted_connections_set_tcp_nodelay, an asyncio teardown issue) that also fails on unmodified main; it is unrelated to this documentation change.