Skip to content

Cost Breakdown#2303

Open
csansoon wants to merge 1 commit intomainfrom
cost-breakdown
Open

Cost Breakdown#2303
csansoon wants to merge 1 commit intomainfrom
cost-breakdown

Conversation

@csansoon
Copy link
Contributor

@csansoon csansoon commented Feb 16, 2026

Introduced the CostBreakdown object, which breaks down the complete cost into different models and parts, which all have different prices.

image

We are also now considering the model's definition for "cache read" and "reasoning" cost from models.dev

Comment on lines +47 to +52
const CATEGORY_COLORS: Record<CostCategory, string> = {
prompt: '#3b82f6',
cached: '#93c5fd',
reasoning: '#22c55e',
completion: '#86efac',
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just hardcoded these colors into the component itself. Should I add them somewhere or use others instead?

@csansoon csansoon force-pushed the cost-breakdown branch 2 times, most recently from ed3c5d8 to 07baa92 Compare February 16, 2026 16:32
@csansoon csansoon force-pushed the cost-breakdown branch 4 times, most recently from bafbf33 to 22dfa32 Compare February 17, 2026 09:09
@csansoon csansoon force-pushed the cost-breakdown branch 2 times, most recently from 650228f to a4c946f Compare February 17, 2026 11:01
},
models: {
cost: (models: { provider: Providers; model: string }[]) => {
const params = new URLSearchParams()
Copy link
Contributor

Choose a reason for hiding this comment

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

NO no

Copy link
Contributor

@andresgutgon andresgutgon left a comment

Choose a reason for hiding this comment

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

searchParams example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants