ck_cost_optimizer
Analyze spending patterns to suggest cost optimizations, or compare AI provider and model prices for a task to reduce costs before selection.
Instructions
Get cost optimization suggestions or compare AI provider/model prices for a task. Read-only — no budget records are written (use ck_budget to record actual spend). Two modes: suggest returns optimization tips based on recent session spending patterns; compare returns a side-by-side price breakdown for the given task. For suggest mode, pass session_id. For compare mode, pass task_description and estimated_tokens along with top_provider and top_model as the baseline. Use ck_cost_optimizer before choosing a model for expensive multi-agent work; use ck_budget to record and enforce spend limits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| estimated_tokens | No | ||
| mode | Yes | Operation mode that determines the tool behavior and return shape. | |
| session_id | No | Unique session identifier for correlating findings, proofs, budget, and audit trail. | |
| spending | No | ||
| task_description | No | Task description for cost estimation. | |
| top_model | No | Primary model for cost comparison. | |
| top_provider | No | Primary provider for cost comparison. |