UnicDB v1.53.11
Robust text extraction from non-standard Lite Model responses
When the model produces 77 output tokens but UnicDB extracts 0 chars (as
happened with glm-5-turbo through some Lite Model proxies), the text was
missed because the response used a shape the parser didn't recognize.
Fix
parseChatCompletionsResponsenow handlesmessage.contentas either a
string or an array of typed parts ([{type:"text", text:"..."}]).- Both parsers fall back to
extractAnyText, a recursive walker that
concatenates any string in text-shaped keys (text,content,
delta,output_text,message). - The SSE aggregator's empty-text path now calls
fallbackTextFromSseEvents
before throwing, so unrecognized SSE shapes still surface their text.
Files
src/ai/provider.ts—extractAnyText+fallbackTextFromSseEvents+ parser fallback wiring