π― Policy-Driven Optimization
Automatically suggest or enforce model downgrades based on your cost policies to maximize efficiency.
CrashLens is a local-first, open-source firewall for your LLM APIs. Scan logs to find waste instantly or actively block and rewrite costly API calls with simple YAML rules. No data ever leaves your system.
Block cost spikes directly in your CI/CD pipeline, not after the fact in a dashboard.
A powerful CLI with no Docker or server dependencies means you can start in minutes.
Use flexible YAML policies, get Slack alerts for critical events, and self-host with confidence.
WORKS WITH YOUR STACK
Reactive cost dashboards only tell you how much you've already overspent. CrashLens embeds financial governance directly into your engineering workflow, giving you active, policy-driven control over every LLM API call before it becomes a line item on your bill.
You don't just "warn" when an engineer calls a premium model for a simple task. With CrashLens, you define and version-control your cost strategy as code. In a simple crashlens.yml
file, you can:
CrashLens integrates into GitHub Actions and other CI/CD pipelines not as a suggestion or "lint," but as a mandatory deploy blocker. If a pull request introduces code that violates your cost policy, the CI check fails.
Breach policy? You don't ship. This transforms cost control from a reactive financial cleanup into a proactive engineering discipline.
π¬ This changes the conversation. A policy override is no longer just a code change; it becomes a conscious business decision that may require executive sign-off.
Embed financial controls directly into your development lifecycle. Define and enforce cost policies in code and prevent overspending before deployment.
Automatically suggest or enforce model downgrades based on your cost policies to maximize efficiency.
Provides detailed token and cost analysis to inform, create, and validate your governance policies before you deploy.
Use our CLI to define cost policies, manage rules, and integrate seamlessly into your local development environment.
Get real-time notifications in Slack or Markdown when policy violations are detected in your CI/CD pipeline.
Simulate the cost impact of code changes against your policies in CI/CD to prevent budget overruns before they happen.
Your code, logs, and keys are never sent to a third party. All analysis and enforcement runs entirely on your infrastructure.
Our local-first scan provides deep insights into common LLM cost drivers. Understanding these patterns is the first step to creating effective cost governance policies and preventing waste before it happens.
Detector | What It Catches | Fix Suggestion |
---|---|---|
Retry Loop Detector | Multiple identical prompts with no success pattern. This highlights a clear need for a max_retries policy. | Limit retries with exponential backoff or fix the upstream bug. Enforce hard limits with a policy rule. |
Fallback Failure Detector | Unnecessary fallback to higher-tier models, indicating a leaky cost-saving strategy. | Fix your application's routing logic. Enforce model tiers automatically with model_downgrade policies. |
Overkill Model Detector | Expensive models (e.g., GPT-4) used for short, simple, or low-value prompts. | Downscale the model for simple tasks. Enforce this automatically with model_choice rules in your policy. |
Prompt Chaining Detector | Excessively long prompt chains where context is repeatedly passed, inflating token counts. | Implement context summarization or a stateful memory system. Prevent runaway chains with a max_token policy. |
CrashLens is production-ready today. These core capabilities provide immediate value and are trusted by teams worldwide to enforce cost governance at scale.
Write CrashLens guardrails and cost policies in simple YAML
Define your LLM usage policies declaratively. Set budgets, model restrictions, and cost thresholds that scale with your team and enforce best practices automatically.
Run CrashLens scans on every pull request automatically
Catch costly LLM patterns before they hit production. Get detailed reports in your PR comments showing potential cost impacts and fix suggestions.
Prevent runaway costs from fallback storms and overkill calls before they hit production
Set intelligent limits and circuit breakers that activate when costly patterns are detected. Stop budget blowouts in real-time, not after the damage is done.
Enterprise-grade access control and cost auditing for teams
Track which team members are driving costs and set role-based permissions for LLM usage. Perfect for organizations that need detailed cost attribution and governance.
Native support for LangChain, LlamaIndex, and popular LLM frameworks
Drop-in monitoring for your existing LLM stack. Get insights without changing your code, with framework-specific optimizations and recommendations.
Get instant Slack/email notifications when usage patterns spike unexpectedly
Stay ahead of budget surprises with intelligent alerting. Know immediately when retry loops or model overkill starts burning through your OpenAI credits.
Scan and analyze logs in real-time as they stream
Watch your LLM costs as they happen. Stream live analysis of your application logs to catch costly patterns the moment they start occurring.
We believe in building transparently with our community. This roadmap outlines our strategic priorities for evolving CrashLens into the definitive platform for LLM cost governance. Timelines are our current targets and may be subject to change.
This section focuses on the immediate evolution of our core policy and enforcement engine.
GitOps-compatible YAML policies with inheritance and templating
Enhanced policy engine supporting version control, automated testing, and environment-specific overrides.
π° Business Impact: Reduces policy management overhead by 50%+ for multi-project teams
Real-time cost circuit breakers with <10ms latency impact
Production-ready circuit breakers preventing retry storms and model escalation incidents.
π° Business Impact: Critical defense against catastrophic budget overruns in production
Specialized detectors for RAG workloads and embedding optimization
Identifies high-cost embedding models, inefficient chunking, and redundant retrievals.
π° Business Impact: Reduces RAG-specific costs by up to 40% through pipeline optimization
This phase is focused on platform expansion, enterprise readiness, and deeper integration into the ecosystem.
Interactive dashboard for non-technical stakeholders
Self-serve cost visualization, trend analysis, and policy management without CLI dependency.
π° Business Impact: Empowers Product/FinOps teams, freeing engineering from manual reporting
Third-party validation of security and compliance controls
Formal audit and certification for enterprise security requirements.
π° Business Impact: Unlocks adoption for large enterprises with strict vendor requirements
Official integrations with Datadog, Grafana, and Prometheus
Export policy events and cost metrics to existing monitoring infrastructure.
π° Business Impact: Single pane of glass for correlating LLM costs with app performance
Our long-term vision is to automate optimization and foster a community-driven ecosystem.
AI-powered prompt optimization reducing token usage by 20-40%
Automated analysis and optimization of prompt patterns for GPT, Claude, and open-source models.
π° Business Impact: Automates manual prompt engineering, accelerating feature delivery
Open ecosystem for sharing policies, detectors, and plugins
Community-driven marketplace for pre-built governance templates and custom integrations.
π° Business Impact: Extends platform capabilities through community expertise and contributions
See how CrashLens prevents LLM waste in your CI/CD pipeline, not your monitoring dashboard
$15K surprise bill from retry storm
Cost spike discovered 3 days later
Emergency team meeting to investigate
Production rollback required
Blocked in CI/CD, saved $15K
Developer notified in 30 seconds
Fix suggestions provided immediately
Zero production impact
Team pushes LLM-powered features to GitHub repository
Automated CrashLens policy check runs in CI/CD pipeline
Fetches and analyzes LLM usage patterns from Langfuse API or log files
YAML-defined rules detect expensive patterns, retry loops, and model misuse
Critical decision point that determines deployment fate
π Click to see how CrashLens handles violations vs clean deployments
# CrashLens Cost Guard name: Cost Guard on: [push] jobs: spend-gate: runs-on: ubuntu-latest steps: - uses: crashlens/action@v1 with: policy: prod-guardrails.yaml action: block
π¨ EMERGENCY: Your LLM costs are spiraling out of control! Block budget overruns immediately with our crisis-ready firewall. Every minute costs you money!
β οΈ CRITICAL: Teams losing $10K+/month without this protection! β οΈ