Skip to content

feat: estimate local OpenAI cache usage - #157

Open
LichKing-2234 wants to merge 1 commit into
Quorinex:mainfrom
LichKing-2234:fix/upstream-cache-usage
Open

LichKing-2234 wants to merge 1 commit into
Quorinex:mainfrom
LichKing-2234:fix/upstream-cache-usage

Conversation

@LichKing-2234

@LichKing-2234 LichKing-2234 commented Aug 17, 2026 •

Copy link
Copy Markdown

Summary

  • Add account-scoped, five-minute local prompt-cache estimates for OpenAI Chat Completions and Responses API usage details.
  • Return standard cached_tokens and cache_write_tokens fields when a stable translated Kiro prefix meets the existing cache threshold.
  • Reuse the existing local prompt-cache tracker model: record only after upstream success; use cumulative history-prefix breakpoints so growing conversations can reuse earlier prefixes.

Semantics

  • These are local estimates, matching the existing Claude-side tracker approach; they are not Kiro upstream cache or billing telemetry.
  • Estimates are isolated by Kiro account and exclude the current user message, current images, and current tool-result bodies.
  • No Kiro request payload, account routing, session affinity, or billing behavior changes.

Validation

  • go test ./...

@LichKing-2234 LichKing-2234 changed the title feat: expose and estimate prompt cache usage feat: estimate local OpenAI cache usage Aug 17, 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.

1 participant