Skip to content

Clarify Appendix A AI credits example with explicit §3.5 cache-read deduction#39098

Merged
pelikhan merged 2 commits into
mainfrom
copilot/expand-appendix-a-example
Jun 13, 2026
Merged

Clarify Appendix A AI credits example with explicit §3.5 cache-read deduction#39098
pelikhan merged 2 commits into
mainfrom
copilot/expand-appendix-a-example

Conversation

Copilot AI commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Appendix A showed token-class inputs and a final cost_usd/aic result, 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

    • The worked example silently depended on subtracting cache_read_tokens from the reported input_tokens before applying the input price.
    • That made the appendix non-reproducible as a conformance check.
  • Changes

    • Updated Appendix A to state that the example assumes cache-read tokens are bundled into the reported input total, so §3.5 applies.
    • Renamed the input line to Input (raw) to distinguish the provider-reported total from the billable net input.
    • Added an explicit deduction step showing 1000 - 400 = 600 net input tokens.
    • Added a per-class cost breakdown so the published cost_usd = 0.0054825 result can be verified directly.
  • Worked example

    Step 1 — Apply §3.5: net input = 1000 − 400 = 600 tokens
    
    input:       600 × 0.000003    = 0.0018000
    output:      200 × 0.000015    = 0.0030000
    cache_read:  400 × 0.0000003   = 0.0001200
    cache_write:  50 × 0.00000375  = 0.0001875
    reasoning:    25 × 0.000015    = 0.0003750
    

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
Copilot AI requested a review from pelikhan June 13, 2026 15:55
@pelikhan pelikhan marked this pull request as ready for review June 13, 2026 15:59
Copilot AI review requested due to automatic review settings June 13, 2026 15:59
@pelikhan pelikhan merged commit d229a81 into main Jun 13, 2026
@pelikhan pelikhan deleted the copilot/expand-appendix-a-example branch June 13, 2026 16:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = 600 net-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

@github-actions github-actions Bot mentioned this pull request Jun 15, 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.

Expand Appendix A worked example in ai-credits-specification.md to show §3.5 cache_read deduction

3 participants