You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nan-spendlogs-queue-error fired on litellm-community. Tracebacks (VictoriaLogs, pods since deleted by KEDA scale-down) classify it as a payload class, not connectivity: 22P05 \u0000 cannot be converted to text. Each firing makes Prisma reject the WHOLE per-minute create_many batch (1-8 rows, mean 5.6, usually belonging to other members) — metering rows are silently lost.
NUL — the usage hook strips chr(0) request-side (deterministic) and output-side (best-effort); the output side loses when LiteLLM reorders the spend payload. The spend-fix image covers only surrogates.
Regex hole in the surrogate repair (spendlogs-surrogate-and-body-fix.patch, active since -spend-fix.5): the (?<!\\) lookbehind refuses to rewrite a lone \udXXX escape that immediately follows an escaped backslash — exactly a Windows path whose name held a JS-sliced emoji. Reproduced standalone; confirmed live in the 2026-10-02 Prisma error row (...Downloads\\\ud83d\ufffd_Rootwoven_Puppy.3mf, deepseek-v4.1-flash tool_calls from a member's Hermes agent on Windows doing 3D/gcode work).
Fix (authorized in session, 2026-10-08)
Deterministic sanitiser at the flush choke point (proxy/utils.py :: ProxyUpdateSpend.update_spend_logs, the last code before create_many), shipped as spendlogs-chokepoint-sanitize.patch in litellm-community-spend-fix:v1.83.14-spend-fix.7:
char-level cleaning of every string leaf of every row: chr(0) dropped, U+D800-U+DFFF -> U+FFFD;
serialized-JSON fields (response/messages/metadata/proxy_server_request, jsonb-parsed by Postgres) round-tripped through real characters — json.loads resolves every \uXXXX escape, the char pass cleans what it resolves, json.dumps(ensure_ascii=True) re-emits valid escapes. Unambiguous where a regex is not: \\ud83d (escaped backslash + literal text, traceback repr) survives untouched; \\\ud83d (path backslash + lone-surrogate escape) is repaired.
Acceptance
New offline suite tests/spend-fix/test_spendlogs_chokepoint_sanitize.py green (behaviour extracted out of the patch file + wiring)
Deployed and verified: image v1.83.14-spend-fix.7 rolled out via ArgoCD (merge f1ebeb17), patch markers verified live in prod pods, 0 spend-logs monitor errors since rollout. Reopen if the payload classes reappear; non-blocking follow-ups tracked in the PR review thread.
Activity
sre-helmcode commentedon Oct 9, 2026
Deployed and verified: image v1.83.14-spend-fix.7 rolled out via ArgoCD (merge f1ebeb17), patch markers verified live in prod pods, 0 spend-logs monitor errors since rollout. Reopen if the payload classes reappear; non-blocking follow-ups tracked in the PR review thread.