[FEATURE] Token cost transparency and user control for inline Visualizer
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
Claude's inline Visualizer generates SVG/HTML widgets as part of the model's output tokens. This is a fantastic feature, but it introduces a 3-12x token cost multiplier that users cannot see, control, or opt out of.
Problem
Token cost per response type
| Response Type | Output Tokens | Multiplier |
|---|---|---|
| Plain text | ~300 | 1x (baseline) |
| Text + simple SVG | ~1,200 | 4x |
| Text + interactive HTML | ~3,500 | 10-12x |
| Multi-visual | ~5,000+ | 15-17x |
Compounding factors
- Output explosion: Each visual costs 3-12x more output tokens
- Context pollution: Rendered widget code persists in conversation history as input tokens (~10-20k dead tokens by turn 15)
- No user control: Model proactively generates visuals; no per-message or global opt-out
Impact on message budgets (200k token budget)
| Visual response % | Messages available | Reduction |
|---|---|---|
| 0% (text only) | ~182 | baseline |
| 25% | ~105 | −42% |
| 50% | ~74 | −59% |
| 75% | ~57 | −69% |
Proposed Solution
Proposed Solutions
High priority
- Visual richness slider — Setting with levels: Off / Minimal (static SVG) / Standard (SVG + styled HTML) / Full (interactive JS widgets). Sits alongside web search and artifacts toggles.
- Context pruning — Replace rendered widget_code in conversation history with
[rendered: {title} | {type}]placeholder. Saves 1-4k input tokens per past visual, per turn. - Per-message override — Toggle in input field: "respond without visuals"
Medium priority
- Token transparency — Per-message token count on hover. Budget meter. Visual-heavy response indicator.
- Widget template system — Model emits
{template: "flowchart", data: {...}}(~100 tokens) instead of raw SVG (~1,500 tokens). Client renders from pre-built templates. 80-95% reduction.
Long-term
- Separate visual token accounting — Don't count widget markup against conversation budget
Additional Context
This analysis was developed collaboratively with Claude in a conversation that itself demonstrated the problem — the visual-heavy conversation consumed approximately 4-5x more tokens than an equivalent text-only discussion.
The Visualizer is one of the best LLM UI innovations I've seen. This request is about preserving its value while giving users informed choice.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
Interactive mode (TUI)
Use Case Example
_No response_
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗