feat(models): show cache write pricing on detail page - #3022
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Walkthrough
ChangesProvider pricing details
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
The per-provider model detail page (
/models/[name]/[provider]) previously only rendered Input, Cached (cache read), and Output token prices, plus request/search/OCR/image/tiered pricing. Several pricing fields that exist on provider mappings were never surfaced anywhere on the page — most notably the cache write rates that Anthropic-style explicit caching bills.This PR lists the remaining pricing details on the detail page:
cacheWriteInputPrice(5-minute TTL)cacheWriteInputPrice1h(1-hour TTL, falling back to the 5-minute rate when unset, matching the model-definition semantics)outputAudioPrice(per output audio token, for TTS/speech models)The existing "Cached" cell is relabeled Cache Read on the detail page to disambiguate it from the new cache-write cells.
Screenshots
Model detail page pricing card for
claude-opus-4-8on Anthropic (a global seed discount is active in the screenshot environment, which is why the strikethrough/discounted prices show — the new cells honor discounts and service-tier multipliers like the existing ones).Light
Dark
(Screenshot PNGs are hosted from an isolated commit and intentionally kept out of the mergeable diff, which contains only the two code files below.)
Scope
detailedprop onProviderSectiongates the additional pricing rows so they appear only on the model detail page (viaDetailProviderCards). The compact model list cards stay unchanged/minimal.PriceCell/formatPricepath, so service-tier multipliers and discounts apply consistently, and cells only render when the corresponding price is present.All data was already exposed by the internal models API (
cacheWriteInputPrice,cacheWriteInputPrice1h,outputAudioPrice); this is a display-only change.Testing
pnpm formatturbo run build --filter=ui🤖 Generated with Claude Code