fix(openai-completions): enable local streaming usage compat (#68711) (thanks @gaineyllc)

This commit is contained in:
Peter Steinberger
2026-04-23 03:32:29 +01:00
parent d968749c4d
commit da8621df0d
6 changed files with 87 additions and 4 deletions

View File

@@ -15,6 +15,10 @@ OpenClaw can also **auto-discover** available models from SGLang when you opt
in with `SGLANG_API_KEY` (any value works if your server does not enforce auth)
and you do not define an explicit `models.providers.sglang` entry.
OpenClaw treats `sglang` as a local OpenAI-compatible provider that supports
streamed usage accounting, so status/context token counts can update from
`stream_options.include_usage` responses.
## Getting started
<Steps>

View File

@@ -12,6 +12,10 @@ vLLM can serve open-source (and some custom) models via an **OpenAI-compatible**
OpenClaw can also **auto-discover** available models from vLLM when you opt in with `VLLM_API_KEY` (any value works if your server does not enforce auth) and you do not define an explicit `models.providers.vllm` entry.
OpenClaw treats `vllm` as a local OpenAI-compatible provider that supports
streamed usage accounting, so status/context token counts can update from
`stream_options.include_usage` responses.
| Property | Value |
| ---------------- | ---------------------------------------- |
| Provider ID | `vllm` |