tinplate_prompt_cache_budgeter
Prompt Cache Key & Context Budgeter API: Estimate tokens, optimize message order for prompt caching, and calculate LLM API costs. (Endpoint: POST /v1/prompt-cache-budgeter)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"blocks": "<blocks>"
},
"name": "tinplate_prompt_cache_budgeter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Target LLM model identifier (e.g., gpt-4o, gpt-4o-mini, o3-mini, claude-3-7-sonnet, claude-3-5-haiku, gemini-2.5-pro, gemini-2.5-flash; unknown models use generic 128K fallback). | claude-3-7-sonnet |
| blocks | Yes | Ordered list of prompt blocks (1 to 200) to analyze for prefix caching and context budgeting. | |
| max_context_tokens | No | Optional context window limit in tokens (defaults to the model's built-in context window). | |
| estimated_cache_hits | No | Estimated batch size (1 cache write + `N - 1` cache reads) used to compute USD savings (default 10). | |
| expected_output_tokens | No | Expected completion output tokens per request for budget and cost calculations (default 500). |