Improve OpenAI streaming usage reporting
TL;DR
Always send `stream_options.include_usage` on streaming requests to ensure local and custom OpenAI-compatible backends report accurate context usage instead of defaulting to 0%.
## What changed OpenClaw now forces stream_options.include_usage on every streaming request to OpenAI and OpenAI-compatible endpoints. The update shipped May 19 2026. Local and custom backends that previously returned zero context usage now report actual token counts.
No user configuration is required. The flag is added automatically in the request body for all streaming calls.
## Why it matters Accurate usage data removes a common blind spot for builders who route traffic between paid APIs and self-hosted models. Without the flag, token tracking stayed broken and bills could jump without clear signals.
The change strengthens OpenClaw's position as a reliable daily driver for mixed-provider setups. It pressures other agent tools to fix the same reporting gap or accept higher support load from confused users.
## How to use it Pull the latest OpenClaw release through the existing CLI command. Restart the agent and send a test streaming prompt to any connected backend. Check the response metadata or provider dashboard for non-zero usage values.
The fix works on current stable versions and requires no YAML edits or new environment variables.
## Watch for Stable usage numbers across Ollama, LM Studio, and custom proxies will confirm the fix holds. A provider that still ignores the flag or returns inflated counts would break the improvement. Expect similar default flags for other streaming options in the next release cycle.
Harsh’s take
This patch removes one source of hidden cost for anyone running OpenClaw with multiple backends. The real trade-off is that every streaming call now carries a small extra payload, which adds up if you keep high-frequency heartbeats active.
Solo operators who treat OpenClaw as a 24/7 assistant should treat the update as a reminder that token visibility is still their responsibility, not the tool's. Set provider-side hard limits today rather than waiting for the next surprise invoice.
Do this now: review the last 30 days of usage logs from every connected model and add alerts at 70 percent of your monthly budget.
by Harsh Desai
About OpenClaw
View the full OpenClaw page →All OpenClaw updatesGo deeper
More AI news
- Daily RoundupGLM 5.3 and Vercel agent tools land, Gemini SAT practice, plus fresh models on Hugging Face
Google and Vercel released new agent and model features while Hugging Face and Replicate added trending models; OpenAI tightened safety after agent issues.
- Daily RoundupVercel-Origin beta and GPT-5.6 Sol discount, plus agent tools for builders
Vercel rolled out Origin repository deployments and a month-long GPT-5.6 Sol discount on AI Gateway while Product Hunt featured new agent layers and Hugging Face highlighted an uncensored Qwen model, with industry moves around data use and automation exits.
- Weekly DigestHermes Agent v0.20 voice and A2A protocol, OpenClaw mobile updates, and multi-agent tools to test now
Hermes Agent rolled out v0.20 releases with voice streaming, A2A interoperability, desktop artifacts, and self-recovery tools while OpenClaw added Android switching, iOS caching, and plugin provenance checks across the week.