Skip to content

server : include usage statistics only when user request them#16052

Merged
rgerganov merged 2 commits into
ggml-org:masterfrom
rgerganov:fix-stats
Sep 18, 2025
Merged

server : include usage statistics only when user request them#16052
rgerganov merged 2 commits into
ggml-org:masterfrom
rgerganov:fix-stats

Conversation

@rgerganov

Copy link
Copy Markdown
Member

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

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
@github-actions github-actions Bot added the python python script changes label Sep 17, 2025
@ngxson

ngxson commented Sep 17, 2025

Copy link
Copy Markdown
Collaborator

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.

@allozaur

Copy link
Copy Markdown
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.

I will check it tomorrow

@rgerganov

Copy link
Copy Markdown
Member Author

And btw I think this should be mentioned in server's changelog as it's technically a breaking change.

Sure. It seems we missed that for PR #15444 which introduced this new way of sending usage statistics.

@allozaur

Copy link
Copy Markdown
Contributor

@ngxson @rgerganov

I've tested with just running.

build/bin/llama-server -hf ggml-org/gpt-oss-20b-GGUF --jinja -c 0

I didn't see anything out of ordinary when testing webui on this branch.

@ngxson ngxson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good then, thanks for testing. I added an entry to #9291

@rgerganov rgerganov merged commit 2b6b55a into ggml-org:master Sep 18, 2025
49 of 50 checks passed
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
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
…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>
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
phibya pushed a commit to ziee-ai/llama.cpp that referenced this pull request May 29, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
…rg#16052)

* 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: ggml-org#16048

* add unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples python python script changes server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: server is always sending usage statistic

4 participants