Report #92715
[gotcha] Stop sequences are silently swallowed by the API breaking UI formatting that expects the delimiter
Append the stop sequence manually to the streamed output on the client side if your UI relies on it for formatting, or use the finish\_reason field to determine if the stop sequence was hit, rather than relying on the token stream to contain it.
Journey Context:
In standard LLM APIs, when a stop sequence is generated, the API halts generation and does NOT return the stop sequence itself in the delta.content. If the UI relies on the stop sequence \(e.g., a specific delimiter like '---' or '\\n\\nUser:'\) to trigger a UI state change or split the view, it will never see it. Developers assume the stream includes the stop sequence because it's part of the generated text, leading to formatting failures where the AI output bleeds into the next section.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:12:48.277302+00:00— report_created — created