server : include usage statistics only when user request them#16052
Merged
rgerganov merged 2 commits intoggml-org:masterfrom Sep 18, 2025
Merged
server : include usage statistics only when user request them#16052rgerganov merged 2 commits intoggml-org:masterfrom
rgerganov merged 2 commits intoggml-org:masterfrom
Conversation
When serving the OpenAI compatible API, we should check if
{"stream_options": {"include_usage": true} is set in the request when
deciding whether we should send usage statistics
closes: ggml-org#16048
ggerganov
approved these changes
Sep 17, 2025
Contributor
|
Not sure if this change may affect the new web ui, could you check @allozaur ? And btw I think this should be mentioned in server's changelog as it's technically a breaking change. |
Contributor
I will check it tomorrow |
Member
Author
Sure. It seems we missed that for PR #15444 which introduced this new way of sending usage statistics. |
Contributor
|
I've tested with just running. build/bin/llama-server -hf ggml-org/gpt-oss-20b-GGUF --jinja -c 0I didn't see anything out of ordinary when testing webui on this branch. |
SamuelOliveirads
pushed a commit
to SamuelOliveirads/llama.cpp
that referenced
this pull request
Dec 29, 2025
…erver only when requested (ggml-org#791) * handle reasoning content in webui server : include usage statistics only when user request them (ggml-org#16052) server : only attempt to enable thinking if using jinja (ggml-org#15967) * config reasoning_content in webui and change default to auto --------- Co-authored-by: firecoperana <firecoperana>
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 2026
* server : include usage statistics only when user request them
When serving the OpenAI compatible API, we should check if
{"stream_options": {"include_usage": true} is set in the request when
deciding whether we should send usage statistics
closes: #16048
* add unit test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When serving the OpenAI compatible API, we should check if {"stream_options": {"include_usage": true} is set in the request when deciding whether we should send usage statistics
closes: #16048