Severity: Medium — streamed <precontext>/<think> tags leak to live consumers
Interfaze streams side-channels inline in content as <precontext>…</precontext> and <think>…</think>. The SDK strips them only from the aggregated accessors (text, finalChatCompletion() / get_final_completion()).
The yielded chunks — and the plain drop-in path (create({stream:true}) / create(stream=True)) — still carry the raw tags in delta.content. Anyone rendering tokens live (the normal streaming UX) sees <precontext>{…}</precontext> and <think>… in the output.
Fix
Provide a delta-level filtered iterator that buffers across tag boundaries and emits only visible text (plus typed precontext/reasoning events), or clearly document that live rendering must consume the filtered helper stream rather than raw deltas.
Severity: Medium — streamed
<precontext>/<think>tags leak to live consumersInterfaze streams side-channels inline in
contentas<precontext>…</precontext>and<think>…</think>. The SDK strips them only from the aggregated accessors (text,finalChatCompletion()/get_final_completion()).The yielded chunks — and the plain drop-in path (
create({stream:true})/create(stream=True)) — still carry the raw tags indelta.content. Anyone rendering tokens live (the normal streaming UX) sees<precontext>{…}</precontext>and<think>…in the output.Fix
Provide a delta-level filtered iterator that buffers across tag boundaries and emits only visible text (plus typed
precontext/reasoningevents), or clearly document that live rendering must consume the filtered helper stream rather than raw deltas.