Clarify Appendix A AI credits example with explicit §3.5 cache-read deduction#39098
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Expand Appendix A worked example for cache_read deduction
Clarify Appendix A AI credits example with explicit §3.5 cache-read deduction
Jun 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AI credits specification’s Appendix A worked example to explicitly apply the §3.5 cache-read deduction so the published cost_usd / aic values are reproducible as a conformance check.
Changes:
- Clarifies that the provider-reported input token total includes cache-read tokens, so §3.5 applies.
- Renames the example’s input line to “Input (raw)” and adds an explicit
1000 − 400 = 600net-input deduction step. - Adds a per-token-class cost breakdown that sums to the published
cost_usd = 0.0054825.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/specs/ai-credits-specification.md | Makes Appendix A reproducible by explicitly applying §3.5 and showing the full per-class cost math that matches the published totals. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
Closed
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.
Appendix A showed token-class inputs and a final
cost_usd/aicresult, but omitted the §3.5 adjustment needed to reproduce that result. As written, a straightforward per-class calculation produced a higher total than the published example.Problem
cache_read_tokensfrom the reportedinput_tokensbefore applying the input price.Changes
Input (raw)to distinguish the provider-reported total from the billable net input.1000 - 400 = 600net input tokens.cost_usd = 0.0054825result can be verified directly.Worked example