Read the token bill — what your LLM feature actually costs — step 6 of 9
This estimator uses ONE rate for both input and output tokens. But output is 5× the price of input on most Anthropic models — so this code under-estimates the real bill by ~60% on a typical chat workload.
Real numbers: Claude Sonnet 4.6 is $3/1M input, $15/1M output. Fix the code to track the two rates separately and apply the correct rate to each side.
Expected output:
estimated cost: $0.036
This estimator uses ONE rate for both input and output tokens. But output is 5× the price of input on most Anthropic models — so this code under-estimates the real bill by ~60% on a typical chat workload.
Real numbers: Claude Sonnet 4.6 is $3/1M input, $15/1M output. Fix the code to track the two rates separately and apply the correct rate to each side.
Expected output:
estimated cost: $0.036
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.