What problem does it solve?
It helps teams prevent runaway LLM costs while still delivering strong output quality by routing requests to the right model and enforcing budget limits.
Core Features & Use Cases
- Model routing by task complexity to send simple requests to cheaper models and complex requests to more capable ones.
- Immutable cost tracking using frozen records so every call is auditable and state changes are predictable.
- Narrow retry logic that retries only transient failures (e.g., rate limits or server/network issues) and fails fast on permanent errors.
- Prompt caching to avoid resending large, repeatable prompts and to reduce both cost and latency.
- Use Case: Processing a batch of mixed-complexity inputs (short summaries, medium analyses, and long documents) while staying under a fixed monthly or per-job budget.
Quick Start
Use the cost-aware-llm-pipeline to process your mixed-complexity inputs while automatically selecting models, enforcing a budget limit, retrying only transient failures, and caching reusable prompt parts to reduce cost.