BAML version: 0.211.2
Language: Python (non-streaming b.parse)
Description
b.parse.MyFunction(text, {}) intermittently returns [] for valid JSON that matches the schema. The issue disproportionately affects arrays where the same union variant repeats (e.g., [Read, Read]), while single items and mixed-type arrays parse reliably.
This is non-streaming — we call b.parse on a complete LLM response string, not stream.getFinalResponse().
Is there any way to get more visibility into why the parsed response was empty?
I did notice that in one of the cases there as an imbalanced quote in the raw text blocks, but parsing locally worked fine.
BAML version: 0.211.2
Language: Python (non-streaming
b.parse)Description
b.parse.MyFunction(text, {})intermittently returns[]for valid JSON that matches the schema. The issue disproportionately affects arrays where the same union variant repeats (e.g.,[Read, Read]), while single items and mixed-type arrays parse reliably.This is non-streaming — we call
b.parseon a complete LLM response string, notstream.getFinalResponse().Is there any way to get more visibility into why the parsed response was empty?
I did notice that in one of the cases there as an imbalanced quote in the raw text blocks, but parsing locally worked fine.