Send the OpenAI usage chunk when the request asks

A client that sets stream_options.include_usage expects the stream to end with one chunk whose choices are empty and whose usage carries the token counts, ahead of the [DONE] sentinel. The fixture's OpenAI stream ended without it, so a gateway that reads usage from the final chunk saw none, while the Anthropic stream already reported usage.

The chunk is sent only when the request sets include_usage, as OpenAI does, so a request without it still sees the unchanged stream. Under the option the earlier chunks carry a null usage, as OpenAI's do.

The Anthropic path reports fixed counts rather than counting, so the OpenAI path reports the same fixed counts. They now live in two names that every usage site reads, which keeps the streamed and unary responses of both surfaces in agreement.

Signed-off-by: Andrew Dunn andunn@gitlab.com AI-Assisted: yes AI-Tools: Claude Code Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com

Merge request reports

Loading
Loading