Conversation cost
Compare full history, a sliding window and summarization over many turns.
Model
150100150200
1K10K100K
1K10K100K
1K10K100K
turns
11020304050
0%25%50%75%100%
Full Context
Keep entire conversation history in context
10 turns$0.88
- Final context
- 23.5K
- Peak context
- 23.5K
- Per turn
- $0.088
- Best coherence
- No information loss
- Cost grows quadratically
Sliding Window
Keep only the last N turns in context
10 turns$0.79
- Final context
- 15K
- Peak context
- 15K
- Per turn
- $0.079
- Predictable costs
- Context size stays bounded
- Loses old context
Summarization
Compress older messages, keep recent ones fresh
10 turns$0.69
- Final context
- 11.9K
- Peak context
- 11.9K
- Per turn
- $0.0688
- Balanced approach
- Preserves key info
- Summary quality varies
Context per turn
Tokens sent with each request.
- Full Context
- Sliding Window
- Summarization
Cumulative cost
Running total across all turns.
- Full Context
- Sliding Window
- Summarization
Turn by turn
Full context, first 10 turns| Turn | Input | Output | Context | Turn cost | Cumulative |
|---|---|---|---|---|---|
| 1 | 5.5K | 1.5K | 5.5K | $0.052 | $0.052 |
| 2 | 7.5K | 1.5K | 7.5K | $0.06 | $0.11 |
| 3 | 9.5K | 1.5K | 9.5K | $0.068 | $0.18 |
| 4 | 11.5K | 1.5K | 11.5K | $0.076 | $0.26 |
| 5 | 13.5K | 1.5K | 13.5K | $0.084 | $0.34 |
| 6 | 15.5K | 1.5K | 15.5K | $0.092 | $0.43 |
| 7 | 17.5K | 1.5K | 17.5K | $0.10 | $0.53 |
| 8 | 19.5K | 1.5K | 19.5K | $0.11 | $0.64 |
| 9 | 21.5K | 1.5K | 21.5K | $0.12 | $0.76 |
| 10 | 23.5K | 1.5K | 23.5K | $0.12 | $0.88 |