Urgent.News

What's breaking now, across thousands of outlets.

Tech

48-Hour Field Notes: My Stream Ended Without [DONE] and the Client Called It Success

Why does a truncated model answer look exactly like a finished one when the only thing you check is the HTTP status code? That question cost me most of a weekend. I had wired a small summarizer to a streaming endpoint, watched it print a paragraph, and shipped it. Two days of field notes later, I had learned that "HTTP 200" tells you nothing about whether the answer actually completed, and that…

The issue at hand revealed a common mistake: assuming that a 200 HTTP status code guarantees a finished streaming response. In reality, the status code alone offers no insight into whether the response completed properly. The reporter had built a small summarizer to a streaming endpoint and found that the parser was reporting success even when the stream never sent a terminator.

This led to outputs abruptly stopping mid-sentence, causing readers to interpret the model as being terse rather than the transport ending. To tackle the problem, the reporter developed a probe harness to check protocol facts instead of just vibes. This probe records four key pieces of information for each request: time to first byte, the presence of a finish_reason in JSON payloads, whether the [DONE] sentinel arrived, and the state of the socket at the end.

By focusing on these objective measures, the reporter could more accurately determine whether a streaming endpoint truly completed its task.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Lim Local: an offline contract checker for freelancers, built with Gemma 4

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built Imagine you are a freelance developer and a new client sends you a contract.

  • Lim Local is an offline contract checker for freelancers.
  • Built with Gemma 4, an open-source model from Google.
  • Helps identify risky contract terms and negotiate better terms.

More from Sunday 18 October →