← Agent Frameworks 🕐 30 min read
Agent Frameworks

Enterprise AI Cost Optimization Playbook — Prioritized Levers and 30-60-90 Day Sprint (2026)

These five actions require no code changes. Each can be enabled by a platform engineer in under two hours.

Audience: FinOps leads, platform engineers, and AI infrastructure owners responsible for enterprise LLM spend.

How to use this document: Levers are ordered by expected ROI and implementation cost. Start at the top and stop when the marginal effort exceeds the marginal saving. The 30-60-90 day sprint in section 7 converts the lever list into a concrete execution plan.

Baseline assumption: A mid-size enterprise AI platform running Bedrock with 3–10 production workloads, Claude Sonnet as the default model, an OpenSearch Serverless Classic knowledge base, and no current cost attribution tooling. Adjust expectations up or down based on your actual scale.


These five actions require no code changes. Each can be enabled by a platform engineer in under two hours. Combined expected impact: 40–70% reduction in the first month’s bill depending on workload mix.

1a. Enable Bedrock Batch Inference for Async Workloads

Expected savings: 50% on eligible jobs Effort: 2 hours — S3 bucket + JSONL format change

Bedrock’s batch inference (Flex tier) prices asynchronous jobs at 50% of the equivalent on-demand rate across all supported models (Anthropic, Meta, Mistral, Amazon Nova). There is no throughput reservation — Bedrock processes the JSONL manifest from S3 within 24 hours and returns results to S3.

Eligible workloads are anything where a 24-hour SLA is acceptable:

  • Nightly document classification or summarization pipelines
  • Bulk content generation (product descriptions, report generation)
  • Offline RAG pre-processing (chunk re-embedding, document re-indexing)
  • Compliance screening and audit log analysis
  • Dataset preparation for fine-tuning runs

Implementation: Package prompts as a JSONL file ({"recordId": "...", "modelInput": {...}}), upload to S3, call CreateModelInvocationJob. The response lands in a second S3 path. No change to prompt structure or model parameters required.

Audit step before enabling: Query CloudWatch for the ratio of synchronous to asynchronous workloads. In most enterprises, 30–50% of total token volume is genuinely async (nightly jobs, background pipelines). If this is your situation, batch inference alone may cut the monthly bill by 15–25% with a single afternoon of work.

Known limitation: Not all models support batch mode. Verify at the AWS Bedrock pricing page before planning. Claude Sonnet and Haiku support it; availability for third-party models varies.


1b. Activate Prompt Caching for Repeated System Prompts

Expected savings: Up to 90% on repeated input tokens Effort: 1–3 hours — add cache-control header to API calls

Bedrock’s prompt caching stores specified input prefixes at AWS so repeated requests with the same system prompt do not reprocess those tokens. The pricing structure for Claude:

TTL Option Cache Write Cost Cache Read Cost
5 minutes 1.25× standard input rate 0.10× standard input rate
1 hour 2.00× standard input rate 0.10× standard input rate

The break-even is a single cache read — after one repeat, the 0.10× read rate more than offsets the 1.25× or 2.0× write cost. At any meaningful request volume, prompt caching on a stable system prompt (instructions, persona, output schema, few-shot examples) pays back immediately.

Real-world impact: Combined with model selection, teams running AWS Nova models have reported 49% savings from caching alone, and 97% when combined with model routing. For Claude Sonnet workloads, a 10K-token system prompt cached at 5-minute TTL with 20 repeat calls per minute produces roughly 87% input token cost reduction on those prompts.

Implementation: Add "cache_point": {"type": "default"} to the system block in the Bedrock Converse API call. This marks the system prompt boundary as a cache checkpoint. No other changes required.

When to use 1-hour vs 5-minute TTL: Use 5-minute TTL for bursty workloads (user sessions, chatbots) where the system prompt is stable within a session. Use 1-hour TTL for pipelines with consistent system prompts that run across many parallel workers — the 2× write cost is spread across many more reads.

Threshold: Only worthwhile for system prompts above 1,024 tokens. Below that threshold, the write cost may not be recovered.


1c. Right-Size Model Tier — Audit Sonnet vs Haiku vs Nova Lite Usage

Expected savings: 5–10× per routed request Effort: 4 hours — token audit + routing logic

The cost difference between model tiers is large:

Model Input (per MTok) Output (per MTok) Relative cost
Claude Sonnet 3.7 ~$3.00 ~$15.00 Baseline
Claude Haiku 3.5 ~$0.80 ~$4.00 ~4× cheaper
Amazon Nova Micro ~$0.035 ~$0.140 ~80× cheaper
Amazon Nova Lite ~$0.060 ~$0.240 ~50× cheaper

In most enterprise deployments, 40–60% of actual request volume consists of tasks that do not require a frontier model: intent classification, entity extraction, structured data parsing, boolean routing decisions, summarization of short documents, and keyword tagging. These tasks perform acceptably or identically on Haiku or Nova Lite.

The audit process:

  1. Pull the last 30 days of Bedrock CloudWatch logs, segmented by model and request type
  2. Identify the five highest-volume task categories by token count
  3. For each category, run a silent A/B test: 10% of traffic to Haiku, measure output quality against your acceptance criteria
  4. Route tasks that pass quality validation to the cheaper model

Realistic target: Routing 40% of volume to Haiku at 4× cost reduction = 30% total bill reduction without touching architecture. Routing some volume to Nova Micro/Lite amplifies this further.

Watch for: Haiku’s reduced instruction-following precision on complex multi-step tasks. Classification and extraction are safe. Multi-turn reasoning chains are not.


1d. Enable AWS Cost Anomaly Detection Scoped to Bedrock

Expected savings: Indirect — prevents unbudgeted spend spikes Effort: 30 minutes — AWS Cost Explorer console

Cost Anomaly Detection uses ML to identify spend patterns that deviate from your historical baseline. For AI workloads, common spike scenarios include:

  • A runaway agent loop processing the same document repeatedly
  • A misconfigured batch job that re-submits the full corpus on every run
  • A new workload launched without budget guardrails
  • A prompt injection attack that drives unusually long responses

Setup: In AWS Cost Explorer, create a Monitor scoped to the AmazonBedrock service. Set alert thresholds at 20% deviation (catches gradual drift) and an absolute dollar threshold matched to your daily budget. Route alerts to a Slack webhook or SNS topic so the on-call team sees them same-day rather than at month-end billing review.

Key insight: At scale, catching a single runaway agent loop early pays for the setup effort many times over. A 10M-token loop running for 6 hours on Sonnet costs roughly $150. At the right alert threshold, anomaly detection triggers within 30 minutes of onset.


1e. Tag LiteLLM IAM Roles and Bedrock Resource Tags

Expected savings: Indirect — enables all downstream attribution Effort: 1 hour — IAM and resource tag configuration

Without tags, your Cost and Usage Report (CUR) shows a single AmazonBedrock line. With tags, every downstream attribution — by team, product, environment, use case — becomes available for free.

Minimum viable tag schema:

Team:         platform / finance / ops / product
Environment:  prod / staging / dev
Workload:     rag-search / classification / summarization / agent
CostCenter:   [business unit code]

Apply these to:

  • LiteLLM IAM roles (propagates to all API calls routed through LiteLLM)
  • Bedrock Knowledge Base resources
  • Bedrock Agent resources
  • S3 buckets holding batch job manifests and outputs

Important: Tags applied to IAM principals propagate to CUR as user:TagName cost allocation tags. Activate cost allocation tags in the Billing console after creation — they are not active by default. Allow 24 hours for tags to appear in CUR.

This one-time setup is the prerequisite for every chargeback and attribution capability added later. Do not skip it.


2. Short-Term Wins — Weeks 2–6 (Minor Engineering, High ROI)

These five changes require 1–3 days of engineering each. Expected combined impact: 30–50% additional reduction on top of week 1 savings.

2a. Implement Context Window Management

Expected savings: 55–70% on agentic workloads Effort: 1–2 days — sliding window or summarization middleware

The largest hidden cost driver in production AI systems is context window growth. Each agent turn appends the previous turn’s output to the context. By turn 10 of a typical agent session, the context contains 8–15× more tokens than the first turn. The cost compounds quadratically with session length.

Two patterns:

Sliding window: Retain only the last N turns (e.g., last 5 exchanges plus the system prompt). Discard earlier turns. Effective for stateless tasks where early context does not affect current turn quality. Implementation is a list slice — 2 hours of work.

Hierarchical summarization: At every K turns, summarize the conversation history into a compact representation and replace the raw history with the summary. More expensive to implement (requires a summarization call) but preserves semantic continuity for tasks where early context matters (long document analysis, multi-step workflows).

Measurement: Log context_tokens per turn for every agent session. Plot the distribution. If p95 context size at turn 5 exceeds 20K tokens, you have unbounded growth and this fix is the highest-priority item in this section.

Numerical example: An agent running 10 turns with no context management on Claude Sonnet, adding 2K tokens per turn: turns 1–10 cost approximately $0.43 total. With a 5-turn sliding window capped at 10K tokens: the same 10 turns cost approximately $0.19 — 55% reduction with zero quality loss on stateless tasks.


2b. Add Step Budget and Session Token Budget to All Agents

Expected savings: Eliminates runaway loop cost entirely Effort: 4 hours — middleware or agent configuration

Agent loops without hard step limits are the most dangerous cost vector in the stack. A misconfigured tool call, an ambiguous task, or a prompt injection can cause an agent to loop indefinitely. At Sonnet pricing, 1,000 tool-call cycles on a 5K-token average context costs approximately $75. Overnight, this becomes a multi-thousand-dollar incident.

Implementation in Bedrock Agents: Set maxIterations on the agent definition. The default is 20 — this is too high for most tasks. Audit your actual p99 step count across agent invocations and set maxIterations to p99 + 20% buffer.

Implementation in LangGraph / custom agents: Add a step counter to agent state. Raise AgentBudgetExceeded at the limit. Log and alert on any agent that hits the ceiling — these are diagnostic signals, not just cost controls.

Session token budget: Set a hard ceiling on total tokens consumed per session (input + output). For most enterprise tasks, 50K tokens per session is generous. Flag sessions exceeding 100K tokens for review.

Recommended thresholds:

Agent Type Max Steps Max Session Tokens
Classification/routing 3 5,000
RAG Q&A 5 15,000
Multi-step research 15 50,000
Autonomous workflow 30 100,000

Combine with Cost Anomaly Detection from section 1d — the budget ceiling stops the runaway, and the anomaly detection catches anything that reaches a high absolute spend before the budget triggers.


2c. Migrate RAG to OpenSearch Serverless NextGen or S3 Vectors

Expected savings: $350–$700/month minimum floor elimination Effort: 1–3 days — KB backend migration

OpenSearch Serverless Classic maintains a minimum of 2 OCUs regardless of traffic. At $0.24/OCU/hour, this is $345–$350/month even when the collection is completely idle. For development environments, staging systems, and low-traffic production workloads, this floor cost is the dominant cost item.

Two alternatives, both now available as Bedrock Knowledge Base backends:

Amazon S3 Vectors (default since December 2025):

  • No idle floor
  • $0.06/GB/month storage + $2.50/million queries
  • At 1M vectors and 100K queries/day: approximately $7.70/month
  • 90% lower cost than OpenSearch Serverless Classic at this scale
  • Recommended for new deployments and any workload under ~500K queries/day

OpenSearch Serverless NextGen (launched May 2026):

  • Scales compute to zero when idle — eliminates the floor cost
  • 20× faster scale-up than Classic
  • Up to 60% lower cost than provisioned OpenSearch for peak-capacity sizing
  • Recommended for high-volume production workloads where p99 query latency matters

Migration path for existing Bedrock Knowledge Bases:

  1. Create a new KB with S3 Vectors backend
  2. Re-ingest existing documents (Bedrock handles chunking and embedding)
  3. Run parallel queries against old and new KB for 48 hours — compare retrieval quality
  4. Flip traffic to new KB
  5. Decommission Classic collection

The re-ingestion step triggers embedding costs. Budget 1–2× the original ingestion cost for the migration. The payback period at $350/month floor savings is typically under 30 days.


2d. Implement Semantic Query Cache for RAG

Expected savings: 20–45% of LLM inference cost on RAG workloads Effort: 2–3 days — Redis with vector similarity layer

A semantic cache intercepts RAG queries before they reach the LLM. If an incoming query is sufficiently similar to a cached query (cosine similarity above a threshold, typically 0.92–0.95), the cached response is returned directly — no LLM call, no retrieval latency.

Production hit rates (2026 benchmarks):

  • FAQ bots and support agents: 40–65% hit rate
  • RAG-backed Q&A on document corpora: 15–25% hit rate
  • Open-ended chat: 10–20% hit rate
  • Agentic tool calls: 5–15% hit rate
  • Blended production systems: 20–45% effective hit rate

At a 30% hit rate and a $4,000/month baseline LLM cost, semantic caching saves approximately $1,200/month. At 45% hit rate: $1,800/month. Infrastructure cost (Redis with vector search, e.g., Redis Cloud or ElastiCache with vector extensions) runs $100–$300/month.

Implementation stack:

  • GPTCache (open source, integrates with LiteLLM) or Redis Vector Search
  • Embedding model for query vectorization: use the same embedding model as your RAG pipeline to ensure semantic consistency
  • Similarity threshold: start at 0.92, tune down if false negatives are too high

Latency benefit: Cache hits return in 3–8ms vs. 500–2000ms for a full RAG + LLM roundtrip — a meaningful UX improvement for interactive applications.

Caution: Do not apply semantic caching to queries where freshness matters (live data, personalized responses, financial queries). Use a query classifier to route fresh-required queries around the cache.


2e. Route Classification and Extraction Tasks to Haiku or Nova Micro

Expected savings: 4–80× per routed request Effort: 1–2 days — intent classifier + model router

Model routing by task complexity is the most impactful ongoing cost lever. The principle: use the cheapest model that produces acceptable output quality for a given task type.

Task taxonomy for routing:

Task Type Recommended Model Quality Parity
Intent classification (N classes) Nova Micro or Haiku Yes for ≤50 classes
Named entity extraction Haiku or Nova Lite Yes for standard entity types
Boolean classification (spam, PII, sentiment) Nova Micro Yes
Structured JSON generation from template Haiku or Nova Lite Yes with validated schema
Short summarization (≤2K input) Haiku Yes
Long document summarization Nova Lite or Sonnet Haiku degrades above ~8K context
Multi-step reasoning Sonnet No cheaper alternative
Code generation Sonnet or above No cheaper alternative
Complex instruction following Sonnet No cheaper alternative

Router implementation options:

  1. Rule-based: Tag request types at the call site, map tags to models in configuration. Zero latency overhead.
  2. LLM-based classifier: Route requests through a fast, cheap model (Nova Micro) to classify complexity, then route to the appropriate model. Adds 50–100ms; worth it for high-volume, mixed-type pipelines.
  3. LiteLLM model routing: Use LiteLLM’s router with fallback chains. Define a routing strategy per model group.

Validation: Run a shadow evaluation for 2 weeks before hard-routing. Compare outputs of the cheap model against your current model on 500 representative requests. Accept the routing if the quality delta is below your threshold.


3. Medium-Term — 1–3 Months (Significant Engineering Investment)

These investments require 1–4 weeks of engineering effort each. They unlock organizational-scale cost control and lay the foundation for chargeback programs.

3a. LiteLLM Production Deployment with Virtual Keys and Team Budgets

Expected savings: 10–20% from routing optimization + full attribution Effort: 2–4 weeks — gateway deployment, key issuance, dashboard

LiteLLM’s proxy layer sits between your applications and all LLM providers (Bedrock, OpenAI, Azure OpenAI, Vertex AI). It provides:

  • Virtual keys: Each team, product, or application gets its own API key. Spend is attributed per key.
  • Budget enforcement: Set monthly dollar limits per key. Requests return HTTP 429 when the budget is exhausted — preventing any team from consuming more than their allocation.
  • Cross-provider routing: Automatically route to the cheapest available model meeting the SLA. Fall back to a more expensive model when the preferred model is unavailable.
  • Spend dashboards: Admin UI shows aggregate spend by user, team, model, and tag.

Chargeback capability: Every request logged by LiteLLM includes model name, token counts (input/output/cache), latency, cost, and the virtual key. Export this to your data warehouse and you have the raw material for internal chargeback — charging business units for their actual AI consumption.

Open-source tier covers: Proxy, Admin UI, virtual keys, budgets, spend tracking, Redis-backed rate limiting.

Enterprise tier ($250/month): Adds SSO (Okta/Azure AD), audit logs, JWT auth, SCIM provisioning, and premium support.

Deployment: Docker container with a PostgreSQL backend for spend persistence. Most enterprise deployments run behind an internal load balancer — no public exposure required.

Known issue: As of June 2026, there is an open GitHub issue (#27735) where BudgetExceededError can fire on stale spend data while /key/info shows spend below the limit. Monitor for this and pin to a patched version.


3b. Request ID Propagation for Cost-Per-Outcome Instrumentation

Expected savings: Enables 10–30% optimization from cost-per-outcome visibility Effort: 1–2 weeks — request ID threading through application layers

The gap between cost-per-token and cost-per-outcome is the largest blind spot in enterprise AI FinOps. An agent that resolves a support ticket in 3 turns at $0.12 is 5× more valuable than one that takes 15 turns at $0.60 — but without outcome attribution, the bill just shows $0.72 in inference costs with no context.

Implementation: Assign a requestId or sessionId at the entry point of every user-facing workflow. Thread this ID through:

  1. All Bedrock API calls (user field, or as a tag)
  2. LiteLLM virtual key metadata
  3. Application event log (outcome: resolved, escalated, abandoned)
  4. Your data warehouse join key

Once you can join inference cost to outcome, you can compute:

  • Cost per resolved ticket
  • Cost per successful document review
  • Cost per sales call prepared
  • Cost per line of code reviewed

These metrics enable optimization that per-token analysis cannot. A 3× increase in first-call resolution rate makes a 2× more expensive agent the correct economic choice.

Prerequisites: Request tagging from section 1e must be in place. LiteLLM gateway from section 3a is the cleanest propagation path.


3c. Reserved Service Tier Commitment After 30+ Days of Sustained Load Data

Expected savings: 15–40% on committed volume vs on-demand Effort: 1 week — commitment evaluation + AWS console

AWS Bedrock’s Reserved Service Tier (provisioned throughput) offers 15–40% discounts relative to on-demand pricing for 1-month or 6-month commitments. The discount increases with commitment duration.

Break-even requirement: Reserved throughput is cheaper than on-demand only when sustained utilization exceeds 80–85%. Below 60% utilization, on-demand is almost always cheaper — you are paying for capacity that sits idle.

Decision checklist before committing:

  • [ ] 30+ days of CloudWatch utilization data at production scale
  • [ ] p50 and p95 throughput by model identified and stable
  • [ ] No major workload changes planned in the commitment period
  • [ ] Utilization above 80% for the target model at p50 (not just p95)
  • [ ] Cost comparison: monthly commitment cost < 30-day on-demand spend × 0.85

Start with a 1-month commitment to validate the utilization assumption before committing to 6 months. The savings from moving to a 6-month commitment are typically an additional 15–20 percentage points — worth a second evaluation after the first month confirms stable utilization.

Anti-pattern: Committing before production traffic is stable. Fine-tuning rollouts, model upgrades, and workload shifts can dramatically change utilization. Section 6 covers this in detail.


3d. Fine-Tuning ROI Evaluation and Selective Deployment

Expected savings: 2.7× ROI at 1M+ requests/month vs frontier model Effort: 4–8 weeks — data curation, training, evaluation, PT deployment

Fine-tuning replaces a large frontier model call with a smaller, specialized model for a bounded task. The economics work only at scale.

The break-even calculation (Claude Sonnet → fine-tuned Nova Lite):

Volume Fine-tuned Nova Lite PT cost Sonnet on-demand cost Net savings
100K req/month $1,296 $480 −$816 (not worth it)
270K req/month $1,296 $1,296 $0 (break-even)
500K req/month $1,296 $2,400 +$1,104/month
1M req/month $1,296 $4,800 +$3,504/month (2.7×)

The $1,296/month floor is the minimum Provisioned Throughput cost for fine-tuned Nova Lite. This floor must be covered before a single dollar of savings materializes.

When fine-tuning is appropriate:

  • Volume above 270K requests/month for the target task
  • Task is bounded and deterministic (classification, extraction, formatting)
  • Training data is available or can be synthesized from existing Sonnet outputs
  • Evaluation harness can measure quality against Sonnet baseline

When fine-tuning is not appropriate:

  • Volume below 270K requests/month (use prompt optimization and model routing instead)
  • Task requires general reasoning, novel context, or out-of-distribution handling
  • Training data quality is insufficient (garbage in, garbage out at higher velocity)
  • No evaluation harness in place to detect quality regression post-deployment

Data pipeline requirement: Fine-tuning requires curated (instruction, output) pairs. Use production Sonnet traces as synthetic training data — filter by acceptance signal (user upvote, downstream action completion) to avoid training on bad outputs.


3e. CUDOS v5.8.1 Deployment for Billing-Accurate Dashboards

Expected savings: Indirect — enables 10–20% optimization from visibility Effort: 1 week — AWS QuickSight + CUR + CUDOS deployment

CUDOS (Cloud Intelligence Dashboards) is AWS’s free Cost and Usage Report visualization layer. Version 5.8.1 (the current version as of 2026) includes pre-built Bedrock views that break down spend by model, region, request type, and tag.

Why this matters: Cost Explorer’s native Bedrock views aggregate across all models and do not surface per-model or per-team granularity. CUDOS + CUR provides billing-accurate attribution with the tag schema from section 1e applied.

Setup prerequisites:

  • CUR v2 with resource IDs enabled
  • Athena query engine on top of CUR bucket
  • Cost allocation tags activated (from section 1e)
  • QuickSight Enterprise subscription ($24/author/month)

Bedrock-specific dashboards in CUDOS 5.8.1:

  • Spend by model (Sonnet/Haiku/Nova/third-party)
  • On-demand vs batch vs Reserved tier split
  • Prompt caching write vs read token ratio (verify caching is actually hitting)
  • Top 10 cost-generating workloads (requires tag schema)
  • Month-over-month trend with anomaly overlay

The prompt caching write/read ratio view is particularly valuable — it confirms that cache reads are exceeding writes, validating that section 1b is actually working.


4. Long-Term — 3–12 Months (Organizational)

4a. FinOps Team Structure for AI

Most enterprise FinOps teams were built for cloud infrastructure (EC2, RDS, S3). AI cost optimization requires different expertise: token economics, model evaluation, prompt engineering, and workload characterization. Two structural patterns work:

Embedded champions model: Each AI product team has a designated engineer responsible for cost monitoring and optimization. A central FinOps team owns tooling, dashboards, and governance standards. Champions implement lever-by-lever optimizations for their workloads. Works well for organizations with 5+ distinct AI product teams.

Centralized AI FinOps team: A dedicated team of 2–4 engineers owns the full cost optimization stack (gateway, dashboards, chargeback, routing). Product teams consume cost as a shared service. Works better when AI workloads are centralized on a common platform.

Core responsibilities regardless of structure:

  • Weekly cost review against budget
  • Monthly model routing effectiveness review
  • Quarterly vendor pricing review and model substitution evaluation
  • Annual budget planning with consumption forecasts

4b. Chargeback Program Launch

Internal chargeback — charging business units for their actual AI consumption — changes team behavior more than any technical control. When teams see a line item for AI spend on their budget, they self-optimize.

Chargeback implementation phases:

  1. Month 1–2: Showback only — share consumption data with teams, no financial impact. Baseline behavior before costs land.
  2. Month 3–4: Soft chargeback — costs are reported against team budgets but there are no hard consequences. Teams begin to care.
  3. Month 5+: Hard chargeback — AI consumption is charged to department cost centers. Budget overruns require justification.

Prerequisites: LiteLLM virtual keys (section 3a), request ID propagation (section 3b), and CUDOS dashboards (section 3e) must all be in place before hard chargeback launches.


4c. Quarterly Vendor Pricing Review and Model Substitution Cycle

AI model pricing has dropped 40–70% annually since 2022 and continues to fall in 2026. A model that was the cheapest option six months ago may now be 2–3× more expensive than a newer alternative with equal or better quality.

Quarterly review agenda:

  1. Pull current pricing for all models in use and all candidate replacements
  2. Run quality benchmarks on the three highest-cost task categories against cheaper alternatives
  3. Evaluate new model releases (Anthropic, Amazon, Meta, Google) against your task portfolio
  4. Update routing configuration for any task where a cheaper model achieves quality parity
  5. Re-evaluate fine-tuning ROI against current on-demand prices (falling prices raise the break-even volume)

Model substitution risk: Do not substitute models without running your evaluation harness. A model that appears cheaper on paper may produce lower-quality outputs that increase downstream costs (rework, escalations, human review).


4d. Cost-Per-Outcome KPI Adoption

The most important long-term change in this playbook is organizational, not technical: replace cost-per-token as the primary FinOps KPI with cost-per-outcome.

Why it matters: Optimizing cost-per-token in isolation creates perverse incentives. A team that moves from Sonnet to Nova Micro cuts per-token cost by 80× but may produce outputs that require 3× more human review — increasing total cost. Cost-per-outcome captures the full picture.

Target KPIs by use case:

Use Case Cost-Per-Outcome KPI
IT support agent Cost per ticket resolved without escalation
Code review assistant Cost per PR reviewed with no missed issues
Document summarization Cost per document summarized, accepted without revision
Sales enablement Cost per call brief used (opened + read by rep)
Compliance screening Cost per document screened, validated by auditor

Instrumentation requirement: Outcome signals must be captured at the application layer and joined to inference costs via the request ID propagation from section 3b. Without this join, cost-per-outcome remains unmeasurable.


4e. EU AI Act Compliance Program (If Applicable)

For enterprises operating in EU markets or handling EU resident data, the EU AI Act High-Risk provisions take full effect August 2, 2026. Compliance costs (risk classification, documentation, human oversight mechanisms, incident reporting) are a real operational budget item that must be included in AI TCO.

Cost implications:

  • High-risk system classification triggers mandatory human oversight requirements — budget for review workflows
  • Transparency obligations for certain generative AI uses affect prompt engineering costs
  • Incident reporting infrastructure requires logging and alerting capabilities (many of which overlap with FinOps instrumentation)

Integration with cost optimization: Build compliance logging on top of the LiteLLM gateway and request ID propagation infrastructure from sections 3a–3b. The audit log required for EU AI Act compliance is the same log you need for chargeback and cost attribution — one implementation serves both.


5. Cost Lever Reference Table

Lever Expected Savings Implementation Effort Prerequisite Risk
Batch inference (Flex tier) 50% on async volume Low — JSONL + S3 S3 access; async-tolerant SLA Model availability varies; 24h max latency
Prompt caching Up to 90% on repeated input tokens Low — API flag System prompt > 1024 tokens; stable across calls Write cost spike if TTL misconfigured
Model routing (Sonnet → Haiku) 4× per routed request Low–Medium — routing config Quality evaluation per task type Quality regression if routing criteria too broad
Model routing (Sonnet → Nova Micro) 80× per routed request Low–Medium — routing config Quality evaluation; Nova task suitability Significant quality risk; narrow task types only
Context window compression 55–70% on agent token volume Medium — sliding window or summarization Agent session telemetry to measure context growth Information loss on long-horizon tasks
Agent step + session budget Runaway loop elimination Low — config + middleware Agent telemetry for p99 step counts Premature termination if thresholds too low
OpenSearch Classic → S3 Vectors $350–$700/month floor elimination Medium — KB re-ingestion Bedrock Knowledge Base; re-embedding cost Re-ingestion latency; temporary dual-cost during migration
OpenSearch Classic → NextGen $350/month floor elimination + 60% peak savings Medium — collection migration High-volume production workload Migration window; NextGen is new (May 2026)
Semantic query cache 20–45% on RAG inference cost Medium — Redis + vector similarity Redis deployment; embedding model for query vectorization False positive cache hits on ambiguous queries
Reserved Service Tier (1-month) 15–25% on committed model Low — console commit 30+ days of utilization data; >80% sustained utilization Cost increases if workload drops below break-even utilization
Reserved Service Tier (6-month) 30–40% on committed model Low — console commit 3+ months of stable utilization data Commitment risk if model is replaced or workload shifts
Fine-tuning (Sonnet → fine-tuned Nova Lite) 2.7× ROI at 1M req/month High — data curation, training, eval, PT >270K requests/month; bounded task type; training data Quality regression; PT floor cost sunk before break-even
RAG k-reduction with reranker Net $3,300–$7,950/month at 100K queries/day Medium — reranker integration High-volume RAG; quality measurement on k=3 vs k=5 Reranker cost ($6K/month at scale) must be offset by LLM savings
LiteLLM virtual keys + team budgets 10–20% from routing + full attribution Medium — gateway deployment PostgreSQL; Redis; network path to all LLM providers Latency overhead (~10–30ms per request); LiteLLM version pinning
Semantic prompt caching (LiteLLM) 5–15% additional on top of Bedrock native Medium LiteLLM gateway deployed Adds infrastructure complexity
CUDOS v5.8.1 dashboards Indirect — enables 10–20% optimization Medium — QuickSight + CUR CUR v2; cost allocation tags activated QuickSight Enterprise license cost
Cross-region cost routing (Flex tier) 0% direct savings; eliminates routing surcharge Low — region config Multi-region Bedrock access Latency increase for non-local regions

6. Anti-Patterns to Avoid

These five mistakes are common, expensive, and often invisible until the monthly bill arrives.

Anti-Pattern 1: Enable Reserved Service Tier Before 30 Days of Utilization Data

The single most expensive mistake in Bedrock cost optimization. Reserved throughput requires sustained utilization above 80–85% to beat on-demand pricing. At 60% utilization, you are paying more than on-demand. At 40%, you are paying nearly 2× more.

What happens: A team sees the 30–40% discount headline and commits to Reserved throughput for a model they are actively developing. Development traffic is spiky and low-volume. The reserved capacity sits idle 70% of the time. The monthly cost exceeds what on-demand would have been.

Prevention: Enforce a 30-day waiting period after a workload reaches production before any Reserved tier evaluation. Require documented utilization data (p50, p95, 7-day and 30-day trends) as part of the commitment approval process.


Anti-Pattern 2: Fine-Tune Small Models for Tasks They Cannot Perform

Fine-tuning amplifies existing model capability — it does not create capability that the base model lacks. A Nova Micro fine-tuned on multi-step legal reasoning will not match Sonnet on multi-step legal reasoning. It will produce confidently wrong outputs at lower cost and lower latency.

What happens: A team identifies a high-cost Sonnet workload (complex contract analysis) and fine-tunes Nova Micro to reduce costs. The fine-tuned model passes initial spot-check evaluation but fails on edge cases in production. Human review costs spike. Total cost exceeds the pre-fine-tuning baseline.

Prevention: Fine-tuning candidates must pass a capability ceiling test before training: run the base model (unfine-tuned) on 100 representative examples from your task distribution. If the base model’s accuracy is below 80%, fine-tuning will not rescue it for this task — choose a more capable base model or route to a frontier model.


Anti-Pattern 3: Apply Contextual Grounding Check to All RAG Queries

Bedrock’s Guardrails contextual grounding check verifies that model outputs are grounded in retrieved source documents. It is valuable for high-stakes RAG applications. It is expensive at scale — each grounding check adds a model call overhead of approximately 0.5–1× the original query cost.

What happens: A team enables contextual grounding on their Bedrock Knowledge Base for all queries as a safety measure. The monthly guardrails cost exceeds the original RAG inference cost. The check catches minimal issues on the vast majority of benign queries.

Prevention: Apply contextual grounding selectively, not universally:

  • Enable for regulated outputs (financial advice, medical information, legal document review)
  • Sample 5–10% of benign query categories to measure grounding score distribution
  • Disable for clearly bounded, low-risk tasks (FAQ, internal knowledge search)
  • Use the sampling data to set thresholds for when to trigger full grounding checks

Anti-Pattern 4: Over-Index on Per-Token Cost While Ignoring TCO

Per-token API cost is the most visible line in the Bedrock bill. It is not the largest cost item at enterprise scale. A Forrester Total Economic Impact study of Microsoft 365 Copilot found implementation and training costs of $11.3M against $5.8M in license costs — nearly 2× — with a 2–4 year ROI horizon (Deloitte 2025, n=1,854).

What happens: A FinOps team achieves a 40% reduction in per-token costs through aggressive model routing but launches three new AI workloads in the same quarter. Total AI spend increases 60%. The per-token savings are real but dwarfed by volume growth and implementation overhead.

Prevention: Track total AI TCO, not just inference costs. Include:

  • API/inference costs (what FinOps optimizes)
  • Implementation and integration engineering costs
  • Evaluation and quality assurance costs
  • Human oversight and review costs
  • Training and change management costs
  • Compliance and audit costs

Build a cost-per-outcome metric (section 4d) that captures the full picture. An expensive model that eliminates downstream human review can have a lower total cost than a cheap model that increases it.


Anti-Pattern 5: Deploy OpenSearch Serverless Classic Instead of NextGen for New RAG Workloads

As of May 2026, OpenSearch Serverless NextGen is available and scales to zero when idle. Classic does not. Classic’s $350/month minimum floor is permanent for the life of the collection.

What happens: An engineer spins up a Bedrock Knowledge Base using the default console settings, which as of early 2026 still defaults to Classic in some regions. The dev/staging environment costs $350–$700/month even on weekends when no one is querying it.

Prevention:

  • For new RAG deployments: default to S3 Vectors as the Bedrock KB backend (lowest cost, no floor)
  • For high-volume production workloads requiring vector search: use OpenSearch Serverless NextGen (scales to zero)
  • Never use OpenSearch Serverless Classic for a new deployment — migrate existing Classic collections to NextGen or S3 Vectors

Migration trigger: If you have an existing OpenSearch Serverless Classic collection that serves under 500K queries/day, the migration to S3 Vectors pays back the migration effort within 30 days at the $350/month floor savings rate.


7. 30-60-90 Day Cost Reduction Sprint

This section converts the lever list into a concrete execution timeline. Assign an owner to each phase before starting.

Day 1 — Baseline and Instrumentation

Goal: Establish cost visibility before making changes. Every optimization from week 1 onward needs a baseline to measure against.

Action Owner Tool Time
Enable AWS Cost Anomaly Detection for Bedrock Platform engineer AWS Cost Explorer console 30 min
Activate cost allocation tags in Billing console FinOps lead AWS Billing console 30 min
Pull last 30 days of Bedrock CUR data FinOps lead Athena + CUR 2 hours
Identify top 5 cost drivers (model × workload) FinOps lead Cost Explorer 2 hours
Set anomaly detection alert thresholds Platform engineer SNS + Slack webhook 1 hour

Success metric: You have a written baseline showing spend by model, by workload type, and by environment. Anomaly alerts are firing to Slack.


Week 1 — Audit and Quick Wins

Goal: Enable the three configuration-only wins (batch, caching, tagging) and complete the model routing audit.

Action Owner Expected Impact Time
Audit workloads for batch inference eligibility Platform engineer Identify 30–50% async volume 4 hours
Enable batch inference on eligible workloads Platform engineer 50% savings on eligible volume 4 hours
Identify system prompts > 1024 tokens Platform engineer Identify caching candidates 2 hours
Enable prompt caching on top 3 system prompts Platform engineer Up to 90% input token savings on repeats 3 hours
Apply IAM and resource tags (full schema) Platform engineer Attribution prerequisite 4 hours
Audit model usage: Sonnet on classification/extraction FinOps lead Identify routing candidates 4 hours
Audit agent step counts at p99 Platform engineer Identify runaway loop risk 2 hours

Success metric: First weekly cost report shows measurable reduction vs Day 1 baseline. Tagging is complete and visible in Cost Explorer. At least two workloads are running on batch inference.


Weeks 2–4 — Short-Term Wins Implementation

Goal: Implement the five short-term levers from section 2.

Action Owner Expected Impact Engineering Days
Implement context window management on all agents Backend engineer 55–70% agent token reduction 3–5 days
Add step budget + session token budget to all agents Backend engineer Runaway loop elimination 1–2 days
Evaluate OpenSearch Classic collections for migration Platform engineer $350/month per collection savings 1 day
Execute KB migration to S3 Vectors (dev/staging first) Platform engineer Floor cost elimination 2–3 days
Implement Haiku/Nova Micro routing for classification tasks Backend engineer 4–80× per routed request 3–5 days
Deploy Redis for semantic cache (staging) Platform engineer 20–45% RAG inference savings 2–3 days

Success metric: Week 4 inference cost is 40–60% below Day 1 baseline. All agents have step budgets. At least one OpenSearch Classic collection migrated. Model routing live for top classification workloads.


Month 2 — Architectural Changes

Goal: Deploy LiteLLM gateway, begin cost-per-outcome instrumentation, and evaluate Reserved tier.

Action Owner Expected Impact Engineering Weeks
Deploy LiteLLM proxy (internal network, no public exposure) Platform engineer Gateway for all teams 1 week
Issue virtual keys per team/workload FinOps lead Attribution and budget enforcement 3 days
Implement request ID propagation across top 3 workloads Backend engineer Cost-per-outcome measurement foundation 1–2 weeks
Deploy semantic cache to production for RAG workloads Platform engineer 20–45% RAG savings 1 week
Evaluate Reserved Service Tier (30 days utilization data now available) FinOps lead 15–25% on committed models 3 days
Begin CUDOS v5.8.1 deployment (QuickSight + CUR) FinOps lead Billing-accurate dashboards 1 week

Success metric: LiteLLM virtual keys are issed to all teams. Cost attribution by team is visible in dashboard. Reserved tier decision made (commit or hold) with documented utilization data. CUDOS dashboards live.


Month 3 — Organizational Changes

Goal: Launch showback program, evaluate fine-tuning candidates, and establish quarterly review cadence.

Action Owner Expected Impact Time
Launch AI cost showback (share consumption data with teams) FinOps lead Behavior change starts 1 week
Complete fine-tuning ROI evaluation for top 2 workloads ML engineer Go/no-go decision for fine-tuning 2 weeks
Establish quarterly model pricing review meeting FinOps lead Ongoing optimization cadence 1 day setup
Define cost-per-outcome KPIs for top 3 use cases Product + FinOps Outcome-aligned optimization 1 week
Document cost optimization runbook and onboarding Platform engineer Organizational knowledge transfer 3 days

Success metric: Month 3 AI infrastructure cost is 50–70% below the Day 1 baseline. All teams have visibility into their consumption. Quarterly review is scheduled. Fine-tuning go/no-go is documented with supporting analysis.


Phase Success Metrics Summary

Phase Primary Metric Target
Day 1 Baseline established Cost by model × workload documented
Week 1 Quick wins live 15–30% cost reduction vs baseline
Weeks 2–4 Short-term wins live 40–60% cost reduction vs baseline
Month 2 Architecture deployed Attribution complete; Reserved tier evaluated
Month 3 Organizational changes 50–70% cost reduction vs baseline; showback active

Reference: Verified Numbers Used in This Playbook

  • Batch inference discount: 50% — AWS Bedrock pricing page (confirmed 2026)
  • Prompt caching read cost: 0.10× standard input rate — AWS Bedrock pricing (5-min and 1-hour TTL options)
  • Prompt caching savings (combined with model selection): up to 97% — AWS Nova benchmark (2026)
  • Model cost ratio (Sonnet → Haiku): ~4× — AWS Bedrock pricing (June 2026)
  • Model cost ratio (Sonnet → Nova Micro): ~80× — AWS Bedrock pricing (June 2026)
  • Semantic cache production hit rate: 20–45% blended — production benchmarks (2026)
  • OpenSearch Serverless Classic floor: $345–$350/month (2 OCUs × $0.24/OCU/hr × 730 hr)
  • OpenSearch Serverless NextGen: scales to zero — AWS announcement May 28, 2026
  • S3 Vectors cost at 1M vectors, 100K queries/day: ~$7.70/month — AWS pricing (Dec 2025)
  • Fine-tuning break-even (Sonnet → fine-tuned Nova Lite): 270K requests/month — corpus research note bedrock-fine-tuning-cost-tracking-2026.md
  • RAG k-reduction reranker net savings: $3,300–$7,950/month at 100K queries/day — corpus research note rag-vector-db-cost-optimization-2026.md
  • Reserved Service Tier break-even: 80–85% sustained utilization — AWS Bedrock pricing analysis (2026)
  • Enterprise AI TCO multiplier: ~3× license cost — Forrester TEI on M365 Copilot; Deloitte 2025 n=1,854 ROI horizon 2–4 years