fix(providers): refresh Trae's stale Referer/Origin and forward user timezone (#12190) (#13255)

Merged as part of the owner batch of 2026-09-11.

This PR had a live worktree in another session, so it sat outside the main 39. Merged on your explicit call, validated first rather than taken on trust: boarded with the other 10 worktree-held PRs into a consolidated worktree off `release/v3.8.51`.

- ESLint over every changed file: no errors
- `typecheck:core` clean; `check:dashboard-typecheck` OK; `check:changelog-integrity` OK
- complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437
- 203 of 208 assertions green. The 5 remaining (`guide-settings-route` ×4, `hard-session-lease-bypass-inventory` ×1) reproduce on the pure tip with nothing from this batch applied.
- `imageGeneration.ts` rebaselined 3259 → 3293 for #12945's image-only-model guard, landed separately in #13392 so nothing was pushed onto a live branch.

⚠️ base-red inherited: #12732 — provider count 356 vs 358 and `open-sse/utils/stream.ts` 3115 > frozen 3098, both reproducing on the pure tip.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-09-11 22:29:02 -03:00
committed by GitHub
parent fb8f7d7fa2
commit 1fb7d5dff2
9 changed files with 157 additions and 3 deletions

View File

@@ -283,6 +283,9 @@ const ENV_ONLY_ALLOWLIST = new Set([
"PII_WINDOW_SIZE",
"TRAE_STREAM_TIMEOUT_MS",
"TRAE_TOKEN",
// #12190: Trae host/Origin override. ENVIRONMENT.md documents no Trae variable at
// all; this joins its two siblings above under the same .env.example-only tier.
"TRAE_WEB_ORIGIN",
]);
// ─── Parsing helpers ───────────────────────────────────────────────────────