Skip to content

serve: report prefix reuse as usage.prompt_tokens_details.cached_tokens - #114

Closed
Yunado wants to merge 1 commit into
Niko1221:mainfrom
Yunado:feat/serve-cached-tokens
Closed

Yunado wants to merge 1 commit into
Niko1221:mainfrom
Yunado:feat/serve-cached-tokens

Conversation

@Yunado

@Yunado Yunado commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

The engine's per-request prefix reuse count already reaches the web Monitor and the internal DONE line; expose it in the OpenAI usage block under the standard prompt_tokens_details.cached_tokens field so any client can show prompt-cache hits. 0 when cold.

The reused count already reaches the web Monitor; expose it in the OpenAI usage block under the standard field. 0 when cold.
@Niko1221

Copy link
Copy Markdown
Owner

Thanks @Yunado - the same field (usage.prompt_tokens_details.cached_tokens) comes with #107, which is merged into the 0.1.23 branch; I'll close this one when 0.1.23 is out.

@Niko1221

Copy link
Copy Markdown
Owner

Closing: usage.prompt_tokens_details.cached_tokens comes with #107, merged for 0.1.23. Thank you @Yunado!

@Niko1221 Niko1221 closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants