[PR #114] [CLOSED] serve: report prefix reuse as usage.prompt_tokens_details.cached_tokens #2466

Closed
opened 2026-11-04 02:00:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/114
Author: @Yunado
Created: 9/29/2026
Status: ❌ Closed

Base: main ← Head: feat/serve-cached-tokens


📝 Commits (1)

  • e5c3d65 serve: report prefix reuse as usage.prompt_tokens_details.cached_tokens

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 serve/server.py (+1 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/114 **Author:** [@Yunado](https://github.com/Yunado) **Created:** 9/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/serve-cached-tokens` --- ### 📝 Commits (1) - [`e5c3d65`](https://github.com/Niko1221/Strata/commit/e5c3d65c71c3bcf69a34f4266076a7ac5a15a6fc) serve: report prefix reuse as usage.prompt_tokens_details.cached_tokens ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+1 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2466
No description provided.