langchain-cost-tuning - Tune LangChain token costs, retries, caching, and budgets
Tunes LangChain AI spend through accurate token accounting, model tiering, cache analysis, retry deduplication, and tenant budget enforcement.
Tags
Updated: 2026-10-06Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Aggregate token usage
- Deduplicate retry emissions
- Tier models by task
- Tune provider cache usage
- Enforce tenant budgets
- Cap agent retries and loops
Inputs
- LangChain application code
- Streaming model events
- Provider billing data
- Tenant and session identifiers
- Model pricing information
Outputs
- Token usage metrics
- Cost reconciliation reports
- Retry and model configurations
- Cache usage aggregates
- Tenant budget states
Requirements
- Claude Code environment
- Python 3.10 or later
- langchain-core 1.0.x
- At least one provider package
- redis-py 5.0 or later for Redis budgets
- Provider console access
