Repository navigation
Account for prompt caching in story evaluations - #133
Merged
Merged
Conversation
This was referenced Oct 29, 2026
R055LE
marked this pull request as ready for review
October 30, 2026 15:43
R055LE
enabled auto-merge (squash)
October 30, 2026 15:44
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.
The evaluation harness bypassed response caching while leaving provider prompt caching uncontrolled. Its reservations used base input prices, and its artifacts dropped the metadata needed to explain higher reported charges.
This change gives the existing profiles explicit prompt-cache policies, serializes the documented OpenAI bypass, and reserves possible cache-write pricing. It retains allowlisted generation IDs, cache counters and cost components. Missing details remain unknown; reported activity under a requested-off policy stops the run after preserving available accounting. Invalid core token totals no longer erase otherwise valid cache evidence.
Stacked on #120. Fixes #132. Production request profiles and daily reservations remain separate work in #116 and #117.
Validation:
git diff --checkpassed.Existing story prompts, reviewer policy and historical ledgers are unchanged. No paid calls were made. Offline tests establish request serialization; live acceptance of the new provider control remains unverified.