Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Dec 17, 2025

Summary

Adds a distinct orange/amber color for Cache Create tokens in the costs tab, differentiating them from Cache Read (grey).

For Anthropic models, cache create is significantly more expensive than cache read (~3.75x input cost vs 0.1x input cost). Having distinct colors makes it easy to see at a glance where costs are coming from.

image

Changes

  • Add --color-token-cache-create CSS variable to all 4 themes (dark, light, solarized-dark, solarized-light)
  • Add cacheCreate key to TOKEN_COMPONENT_COLORS
  • Update CostsTab.tsx to use new color in both:
    • The token component table color indicators
    • The cost percentage bar visualization
  • Update tokenMeterUtils.ts SEGMENT_DEFS to use new color for context usage bar
  • Add CostsTabWithCacheCreate story showing the visual difference

Color choices

Theme Cache Create Cache Read
Dark hsl(30 90% 50%) (amber) hsl(0 0% 50%) (grey)
Light hsl(30 85% 45%) (darker amber) hsl(210 16% 50%) (grey)
Solarized #cb4b16 (solarized orange) #839496 / #586e75 (grey)

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

- Add --color-token-cache-create CSS variable (orange/amber) to all 4 themes
- Add cacheCreate key to TOKEN_COMPONENT_COLORS
- Update CostsTab and tokenMeterUtils to use distinct color for cache create
- Add CostsTabWithCacheCreate story showing the visual difference

Cache create is significantly more expensive than cache read for Anthropic
models, so having distinct colors makes it easier to see where costs are
coming from at a glance.
Missed this inline cost bar - was still using TOKEN_COMPONENT_COLORS.cached
instead of TOKEN_COMPONENT_COLORS.cacheCreate for the cache create segment.
@ethanndickson ethanndickson added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit a30adbc Dec 17, 2025
20 checks passed
@ethanndickson ethanndickson deleted the ethan/cache-create-color branch December 17, 2025 06:30
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