<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eric Thompson</title>
    <description>The latest articles on DEV Community by Eric Thompson (@ericthompson21).</description>
    <link>https://dev.to/ericthompson21</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4105903%2F22109b43-e652-4793-878d-288e4641721a.jpg</url>
      <title>DEV Community: Eric Thompson</title>
      <link>https://dev.to/ericthompson21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ericthompson21"/>
    <language>en</language>
    <item>
      <title>Self-Hosted vs Managed Vector Databases: A Cost Modeling Guide</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Fri, 13 Nov 2026 10:04:50 +0000</pubDate>
      <link>https://dev.to/ericthompson21/self-hosted-vs-managed-vector-databases-a-cost-modeling-guide-4ohp</link>
      <guid>https://dev.to/ericthompson21/self-hosted-vs-managed-vector-databases-a-cost-modeling-guide-4ohp</guid>
      <description>&lt;p&gt;For most companies under about 10 million vectors, a managed vector database costs $50 to $1,500 a month and is cheaper than self-hosting once engineering time is counted. Self-hosting starts to win at high query volume, at 50–100 million vectors and above, or when you can reuse an existing Postgres or platform team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three variables decide the bill:
&lt;/h2&gt;

&lt;p&gt;Memory footprint: vector count multiplied by dimensions, plus index overhead. This sets the size of the machines you need when self-hosting, and the storage line when you buy managed.&lt;br&gt;
Query and write volume: usage-priced services such as Pinecone Serverless charge per read and write, so busy applications pay more each month. Capacity-priced options, including self-hosting, charge the same whether you run one query or a million.&lt;br&gt;
People: a self-hosted cluster needs someone to patch, scale, back up, tune and be on call for it. That cost exists even when the infrastructure is cheap.&lt;br&gt;
The common mistake is comparing a managed price per gigabyte with the raw cost of a virtual machine. A fair comparison counts replicas, backups, index rebuilds and the engineer who keeps it all running.&lt;br&gt;
All figures in this guide are planning estimates based on published list prices as of November 2026. Vendors changed pricing several times during 2026, so check current rates before you commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step one: size your vectors
&lt;/h2&gt;

&lt;p&gt;Before comparing prices, work out how much memory and storage your vectors need. Every cost model starts from bytes, not from vector counts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The basic math
&lt;/h2&gt;

&lt;p&gt;Each dimension of a standard float32 vector takes 4 bytes. A 1,536-dimension embedding is about 6.1 KB.&lt;br&gt;
An HNSW index, the most common search index, adds graph structure on top. A vector index sizing guide suggests roughly doubling raw vector size to account for it.&lt;br&gt;
Add metadata (document IDs, text chunks, filters) and replicas for availability.&lt;/p&gt;

&lt;h2&gt;
  
  
  What that means at common scales (1,536 dimensions)
&lt;/h2&gt;

&lt;p&gt;1 million vectors: about 6 GB of raw vectors, roughly 12–25 GB in memory with the index.&lt;br&gt;
10 million vectors: about 61 GB raw. One analysis of pgvector in production budgets 20–25 KB per vector with the graph, or 200–250 GB, if nothing is compressed.&lt;br&gt;
100 million vectors: over 600 GB raw before the index. At this scale, ClickHouse's engineering guidance suggests evaluating whether standard in-memory HNSW is still the right structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compression changes everything
&lt;/h2&gt;

&lt;p&gt;Quantization shrinks vectors with a small loss in recall:&lt;br&gt;
Half precision (float16, or halfvec in pgvector) halves memory.&lt;br&gt;
Scalar quantization to int8 cuts memory by about 75%.&lt;br&gt;
Binary or product quantization can cut memory by up to 90% or more, usually paired with re-ranking to recover accuracy.&lt;br&gt;
Smaller embedding models help too. A 768-dimension model needs half the memory of a 1,536-dimension one, and many newer models let you request shorter vectors directly.&lt;br&gt;
Compression is the single biggest cost lever in vector search, and it applies whether you self-host or buy managed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How managed vector databases are priced
&lt;/h2&gt;

&lt;p&gt;Managed vector databases use three main pricing models: usage-based, per-dimension and capacity-based. The same workload can cost very different amounts depending on which model you are on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage-based: Pinecone Serverless
&lt;/h2&gt;

&lt;p&gt;Pinecone's pricing page lists storage at $0.33 per GB per month, with Standard plan read units from $16 per million and write units from $4 per million, plus a $50 monthly minimum. Enterprise starts at $500 a month with higher unit rates.&lt;br&gt;
The detail that drives cost: according to UsagePricing's breakdown, a query uses roughly 1 read unit per GB of namespace searched, with a minimum of 0.25, and a write uses 1 write unit per KB. In practice, large single namespaces make every query expensive, while splitting data into many smaller namespaces (for example, one per customer) keeps reads cheap.&lt;br&gt;
Best fit: small to mid-size indexes, spiky or low query volume, multi-tenant apps that split data by namespace.&lt;/p&gt;

&lt;h2&gt;
  
  
  Per-dimension: Weaviate Cloud
&lt;/h2&gt;

&lt;p&gt;Weaviate Cloud bills mainly on vector dimensions stored. After a January 2026 restructure, UsagePricing reports a Flex plan at $45 a month with an entry rate of about $0.00465 per million dimensions, with Premium plans from $400 a month. Higher-dimension embeddings cost proportionally more, so compression and smaller models reduce the bill directly.&lt;br&gt;
Best fit: teams that want hybrid keyword and vector search built in, with a predictable monthly bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Capacity-based: Qdrant Cloud, Zilliz Cloud and managed Postgres
&lt;/h2&gt;

&lt;p&gt;Qdrant Cloud bills hourly for the vCPU, memory and storage you allocate, with no per-query fees. Zilliz Cloud (managed Milvus) uses compute units. Managed Postgres with pgvector, such as AWS RDS, Supabase or Neon, bills for the database instance.&lt;br&gt;
Capacity pricing gets cheaper per query as traffic grows, until you need a bigger node.&lt;br&gt;
Best fit: steady, high query volume, and teams that already run Postgres.&lt;/p&gt;

&lt;h2&gt;
  
  
  Light-load comparisons can mislead
&lt;/h2&gt;

&lt;p&gt;Published comparisons often assume light traffic. One 2026 comparison at 10 million 768-dimension vectors put Qdrant Cloud at about $65 a month, Pinecone at $70, pgvector on RDS at $120 and Weaviate Cloud at $135. Those numbers are useful for small workloads but say little about cost at production query volume, which is where the models diverge.&lt;/p&gt;

&lt;h2&gt;
  
  
  What self-hosting really costs
&lt;/h2&gt;

&lt;p&gt;Self-hosting replaces a vendor bill with three costs: compute, operations and people. The software is free; running it reliably is not.&lt;br&gt;
Compute and storage&lt;br&gt;
You run Qdrant, Milvus, Weaviate or Postgres with pgvector on your own virtual machines or Kubernetes cluster. Memory-optimized instances are the main cost:&lt;br&gt;
A 32 GB memory-optimized cloud instance costs roughly 150–250 a month on demand.&lt;br&gt;
A 128 GB instance costs roughly 600–900 a month.&lt;br&gt;
A 256 GB instance costs roughly 1,200–1,800 a month.&lt;br&gt;
Plan for at least two replicas for availability, plus disk, snapshots and backups. Reserved instances or committed-use discounts typically cut compute by 30–50%.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operations
&lt;/h2&gt;

&lt;p&gt;Index builds and rebuilds: HNSW builds are memory-hungry. A guide to scaling pgvector estimates about 60 GB of working memory to build an index on 5 million 1,536-dimension vectors, so builds may need temporary larger machines.&lt;br&gt;
Re-embedding: switching embedding models means re-embedding and re-indexing the whole corpus, which needs spare capacity.&lt;br&gt;
Scaling and sharding: past a single node, you manage shards, replicas and rebalancing.&lt;br&gt;
Security: network isolation, encryption, access control and patching.&lt;br&gt;
Monitoring: latency, recall, memory pressure and disk usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  People
&lt;/h2&gt;

&lt;p&gt;Running a production vector database needs part of an engineer's time for upgrades, tuning, incidents and on-call. As a planning range:&lt;br&gt;
Small single-node deployment: about 10% of one engineer.&lt;br&gt;
Mid-size replicated cluster: about 25% of one engineer.&lt;br&gt;
Large sharded cluster: about 50% of one engineer or more.&lt;br&gt;
At a fully loaded cost of $200,000 a year, that is roughly $1,700 to $8,300 a month, often more than the infrastructure itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The big exception: you already run Postgres
&lt;/h2&gt;

&lt;p&gt;If your team already operates Postgres in production, adding pgvector for a few million vectors can cost almost nothing extra. Backups, monitoring, access control and on-call already exist. This is why pgvector is often the cheapest option for small and mid-size RAG workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  A cost model at three scales
&lt;/h2&gt;

&lt;p&gt;At small scale, managed services win clearly. At mid scale, the answer depends on query volume and whether you can share engineering time. At very large scale, self-hosting usually wins on cost if you have the team.&lt;br&gt;
The assumptions: 1,536-dimension embeddings, a RAG workload with 1 million queries a month at small scale and 5 million at mid and large scale, and monthly re-indexing of about 10% of vectors. Engineering time is costed at $200,000 a year fully loaded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scale 1: 1 million vectors
&lt;/h2&gt;

&lt;p&gt;Pinecone Serverless: about 7 GB stored costs about $2; at roughly 7 read units per query, 1 million queries cost about $112; writes are minor. Total about $120 a month.&lt;br&gt;
Weaviate Cloud Flex: about 1.5 billion dimensions at the entry rate is a few dollars, so the $45 plan minimum applies. Total about 45–100 a month.&lt;br&gt;
Self-hosted on new infrastructure: two 32 GB instances plus storage cost about $400, plus about 10% of an engineer at about $1,700. Total about $2,100 a month.&lt;br&gt;
pgvector on existing Postgres: often under $200 a month in extra capacity.&lt;br&gt;
Verdict: managed, or pgvector on Postgres you already run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scale 2: 10 million vectors
&lt;/h2&gt;

&lt;p&gt;Pinecone Serverless in one large namespace: about 70 GB stored costs about $23, but at roughly 70 read units per query, 5 million queries cost about $5,600. Total about $5,700 a month. Split into many smaller namespaces, reads drop sharply.&lt;br&gt;
Weaviate Cloud: about 15 billion dimensions at the entry rate is about $71 a month in dimension charges, plus plan minimums and any compute or compression add-ons.&lt;br&gt;
Self-hosted with int8 quantization: two 128 GB instances plus storage cost about $1,600, plus about 25% of an engineer at about $4,200. Total about $5,800 a month.&lt;br&gt;
Qdrant Cloud or similar capacity-priced managed service: typically a few hundred to a few thousand dollars a month depending on the cluster, with no per-query fees.&lt;br&gt;
Verdict: a capacity-priced managed service or a well-partitioned usage-based index is usually cheapest. Self-hosting only wins here if engineering time is shared with an existing platform team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scale 3: 100 million vectors
&lt;/h2&gt;

&lt;p&gt;Pinecone Serverless in large namespaces: read costs become very large at millions of queries a month. Dedicated read capacity, aggressive namespace partitioning or an enterprise agreement becomes necessary.&lt;br&gt;
Self-hosted with quantization and sharding: four 256 GB instances (two shards, two replicas) plus storage cost about $6,500, plus about 50% of an engineer at about $8,300. Total about $15,000 a month.&lt;br&gt;
Managed capacity-priced services: one 2026 comparison estimated about $480 a month on Qdrant Cloud versus about $280 self-hosted at 100 million vectors and 10 million queries a month, but that assumes compact vectors and a lean configuration. Real costs scale with dimensions, replicas and recall targets.&lt;br&gt;
Verdict: self-hosting or a negotiated enterprise contract usually wins, and compression, disk-based indexes such as DiskANN, and partitioning matter more than the vendor.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the model shows
&lt;/h2&gt;

&lt;p&gt;Usage-based pricing is cheapest at low volume and becomes expensive when large indexes meet high query volume.&lt;br&gt;
Capacity-based pricing, managed or self-hosted, gets cheaper per query as traffic grows.&lt;br&gt;
People cost dominates self-hosting below roughly 50 million vectors unless the engineers are already on payroll for other infrastructure.&lt;br&gt;
Treat these as illustrative numbers; plug in your own vector count, dimensions, query volume and salaries.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to decide, and how to cut costs
&lt;/h2&gt;

&lt;p&gt;Choose managed when speed and low operational load matter most, and self-host when scale, data control or existing infrastructure make it cheaper. Whichever you pick, a few levers cut cost on any platform.&lt;br&gt;
Choose managed when&lt;br&gt;
You have fewer than about 10 million vectors, or traffic that is spiky or unpredictable.&lt;br&gt;
You do not have database or platform engineers with spare capacity.&lt;br&gt;
Speed to production matters more than unit cost.&lt;br&gt;
You need built-in features such as hybrid search, reranking or multi-tenancy without building them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose self-hosted when
&lt;/h2&gt;

&lt;p&gt;You already run Postgres, Kubernetes or search infrastructure with an experienced team.&lt;br&gt;
You have 50–100 million vectors or more, or very high, steady query volume.&lt;br&gt;
Data residency, air-gapped deployment or strict compliance rules out third-party hosting.&lt;br&gt;
You need custom indexing, filtering or hardware choices that managed services do not offer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Eight ways to cut vector database costs
&lt;/h2&gt;

&lt;p&gt;Quantize: use half precision, int8 or binary quantization with re-ranking. It is the biggest saving available.&lt;br&gt;
Use smaller embeddings: choose a 768-dimension or shorter output where retrieval quality holds up in your evaluations.&lt;br&gt;
Partition by tenant or topic: smaller namespaces or collections make each query cheaper on usage-based pricing and faster everywhere.&lt;br&gt;
Index only what you search: keep raw text and rarely queried metadata in cheaper storage, linked by ID.&lt;br&gt;
Delete stale vectors: remove outdated document versions and duplicates on a schedule.&lt;br&gt;
Re-embed in batches: plan model upgrades as batch jobs on temporary capacity, not on your production cluster.&lt;br&gt;
Cache frequent queries: many RAG workloads repeat the same questions.&lt;br&gt;
Start on pgvector if you already run Postgres, and move to a dedicated vector database only when measured latency, scale or features require it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How much does a vector database cost?
&lt;/h2&gt;

&lt;p&gt;A vector database typically costs $50 to $1,500 a month for up to 10 million vectors on a managed service, and several thousand dollars a month at larger scale. Self-hosting has lower infrastructure cost but adds engineering time that often exceeds the hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is self-hosting a vector database cheaper than Pinecone?
&lt;/h2&gt;

&lt;p&gt;It can be at high query volume or above roughly 50 million vectors, especially if your team already runs similar infrastructure. Below that, Pinecone or another managed service is usually cheaper once engineering time is included.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much memory do I need for 1 million vectors?
&lt;/h2&gt;

&lt;p&gt;About 6 GB for 1 million 1,536-dimension float32 vectors, and roughly 12–25 GB once an HNSW index and metadata are added. Quantization can reduce this by 50–90%.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is pgvector good enough for production?
&lt;/h2&gt;

&lt;p&gt;Yes, for many workloads up to several million vectors, especially if you already run Postgres. Past about 10 million high-dimension vectors, you will need quantization, memory tuning and possibly partitioning, or a dedicated vector database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is my Pinecone bill higher than expected?
&lt;/h2&gt;

&lt;p&gt;Read costs scale with the size of the namespace each query searches, not just the number of queries. Large single namespaces make every query expensive; splitting data into smaller namespaces and reducing vector size usually lowers the bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the cheapest vector database?
&lt;/h2&gt;

&lt;p&gt;For small projects, free tiers from Pinecone, Qdrant and Weaviate, or pgvector on an existing Postgres database, cost little or nothing. At large scale, self-hosted open-source options such as Qdrant, Milvus or pgvector are cheapest if you have the team to run them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should I switch vector databases later?
&lt;/h2&gt;

&lt;p&gt;Plan for it. Keep embeddings and source documents in your own storage so you can re-index into another database. Switching usually costs a re-embedding or re-indexing run plus testing, not a rebuild of your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get a vector database cost model for your workload
&lt;/h2&gt;

&lt;p&gt;The cheapest option depends on your vector count, query patterns and team. CodingCops designs and runs retrieval infrastructure for RAG and AI agents, managed or self-hosted, and sizes it against real workloads before you commit. Talk to CodingCops for a cost model built on your data.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>database</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>How to Estimate the Infrastructure Cost of a Production RAG Pipeline</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Wed, 11 Nov 2026 11:32:07 +0000</pubDate>
      <link>https://dev.to/ericthompson21/how-to-estimate-the-infrastructure-cost-of-a-production-rag-pipeline-4g62</link>
      <guid>https://dev.to/ericthompson21/how-to-estimate-the-infrastructure-cost-of-a-production-rag-pipeline-4g62</guid>
      <description>&lt;p&gt;In our illustrative model, a production RAG pipeline costs about $1,350 a month for an internal assistant answering 100,000 questions, $6,550 for a support assistant answering 500,000, and $28,350 for enterprise search answering 2 million. That is infrastructure only, before the engineers who run it.&lt;br&gt;
The surprise for most teams is where the money goes. LLM generation is 78–84% of the bill in every scenario, because each answer sends several thousand tokens of retrieved text to the model. Embedding the whole corpus costs between about $1 and $115, once. The vector database is often the smallest line, until the index grows large enough that every query scans tens of gigabytes.&lt;br&gt;
So the biggest savings come from sending fewer, better chunks to the model, not from shopping for a cheaper vector store. The method below shows each component and its formula, so you can plug in your own corpus size and query volume.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six cost components of a RAG pipeline
&lt;/h2&gt;

&lt;p&gt;A RAG pipeline has two halves: building and maintaining the index, and answering each query. Most of the cost sits in the second half.&lt;/p&gt;

&lt;h2&gt;
  
  
  Index side (mostly one-time, plus churn)
&lt;/h2&gt;

&lt;p&gt;Ingestion and chunking. Parsing documents, splitting them into chunks and attaching metadata. Usually compute you already run.&lt;br&gt;
Embedding the corpus. Converting every chunk into a vector, once at the start and again whenever content changes or you switch embedding models.&lt;br&gt;
Vector storage and writes. Storing the vectors and their metadata, and paying to write or overwrite them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Query side (every request)
&lt;/h2&gt;

&lt;p&gt;Query embedding and vector search. Embedding the user's question and searching the index.&lt;br&gt;
Reranking. Re-scoring the top results with a more accurate model, so only the best chunks reach the LLM. Optional but common.&lt;br&gt;
LLM generation. Sending the question plus retrieved chunks to the model and generating the answer.&lt;br&gt;
On top of these sit operating costs that teams often leave out: evaluation, observability, re-indexing projects and the engineers who maintain the pipeline. Those are covered later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ingestion and embedding costs
&lt;/h2&gt;

&lt;p&gt;Embedding a corpus is far cheaper than most teams expect. At current API prices, even a five-billion-token document collection costs about $115 to embed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sourced prices
&lt;/h2&gt;

&lt;p&gt;OpenAI prices text-embedding-3-small at $0.02 per million tokens and text-embedding-3-large at $0.13 per million. Both support a dimensions parameter that shortens the stored vector; text-embedding-3-large produces up to 3,072 dimensions (OpenAI, Jan 2024; current price confirmed on OpenAI's model page).&lt;/p&gt;

&lt;h2&gt;
  
  
  The formula
&lt;/h2&gt;

&lt;p&gt;\text{Embedding cost} = \frac{\text{corpus tokens} \times (1 + \text{overlap})}{10^6} \times \text{price per million tokens}&lt;br&gt;
Worked examples (illustrative, text-embedding-3-small, 15% overlap)&lt;br&gt;
50 million tokens (a mid-sized internal knowledge base): 50 × 1.15 × $0.02 = $1.15&lt;br&gt;
200 million tokens (a product's full help center, tickets and manuals): $4.60&lt;br&gt;
5 billion tokens (an enterprise document archive): 5,000 × 1.15 × $0.02 = $115&lt;br&gt;
With text-embedding-3-large the same figures are 6.5 times higher, still small.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the real ingestion cost sits
&lt;/h2&gt;

&lt;p&gt;Parsing. PDFs with tables, scanned documents and slide decks need extraction or OCR, which can cost more in compute and engineering time than the embeddings themselves.&lt;br&gt;
Re-embedding when you change models. Switching embedding models means re-embedding everything, because vectors from different models cannot be mixed in one index. The API cost is small; the migration work and testing are not.&lt;br&gt;
Ongoing churn. At 10% of content changing per month, re-embedding costs pennies to about $12 a month in our scenarios. The pipeline that detects and processes those changes is the real cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vector storage and search
&lt;/h2&gt;

&lt;p&gt;Managed vector databases are cheap for small indexes and get expensive in one specific way: on usage-based pricing, query cost can grow with index size, not just with query count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sourced pricing: Pinecone as an example
&lt;/h2&gt;

&lt;p&gt;Pinecone's on-demand Standard plan has a $50 monthly minimum, then charges $0.33 per GB-month of storage, $4 to $4.50 per million write units and $16 to $18 per million read units, varying by cloud and region (Pinecone pricing). Its cost documentation sets the rules (Pinecone docs):&lt;br&gt;
Storage per record: ID bytes + metadata bytes + (dimensions × 4 bytes) for dense vectors&lt;br&gt;
Writes: 1 write unit per KB of upsert request, minimum 5 per request&lt;br&gt;
Queries: 1 read unit per GB of namespace queried, minimum 0.25 per query, regardless of how many results are returned&lt;br&gt;
Other managed and self-managed options (pgvector on an existing Postgres, open-source vector databases, search engines with vector support) price differently, often by instance size rather than usage. The sizing math below still applies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sizing an index (illustrative)
&lt;/h2&gt;

&lt;p&gt;One chunk stored at 1,536 dimensions with 1,000 bytes of metadata: 8 + 1,536 × 4 + 1,000 = 7,152 bytes.&lt;br&gt;
100,000 chunks: about 0.72 GB&lt;br&gt;
400,000 chunks: about 2.86 GB&lt;br&gt;
10 million chunks: about 71.5 GB&lt;/p&gt;

&lt;h2&gt;
  
  
  Why index size drives query cost
&lt;/h2&gt;

&lt;p&gt;Under the read-unit rule, a query against a 71.5 GB namespace costs 71.5 read units. At $16 per million, that is about $0.0011 per query, or $2,289 for 2 million queries a month. The same query against a 0.72 GB index costs one-hundredth as much.&lt;br&gt;
The practical fix is partitioning. If each query only needs one department's, customer's or product line's documents, store them in separate namespaces so each search scans only the relevant slice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Query-time costs: embedding, reranking and generation
&lt;/h2&gt;

&lt;p&gt;Every question triggers three paid steps. The first is negligible, the second is moderate, and the third dominates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Query embedding
&lt;/h2&gt;

&lt;p&gt;A 30-token question at $0.02 per million tokens costs $0.0000006. Even 2 million questions a month cost about $1.20.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reranking
&lt;/h2&gt;

&lt;p&gt;Rerankers re-score the top 20 or so search results so only the best few reach the LLM. Pricing is in flux:&lt;br&gt;
Cohere previously charged $2.00 per 1,000 searches for Rerank 4 Fast and $2.50 for Rerank 4 Pro.&lt;br&gt;
According to UsagePricing's capture of Cohere's rate card, Rerank 5 (released October 2026) moved to per-token billing at a reported $0.02 per million tokens for Fast and $0.05 for Pro (UsagePricing, Oct 2026). Verify on Cohere's own pricing page before budgeting.&lt;br&gt;
Under per-token pricing, cost depends on how much text you rerank: 20 chunks of 500 tokens is 10,000 tokens per query. Short snippets get cheaper; long passages may not. This article uses the older $2 per 1,000 searches as a conservative estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  LLM generation
&lt;/h2&gt;

&lt;p&gt;This is the line that matters. Each answer sends the system prompt, the question and the retrieved chunks to the model.&lt;br&gt;
\text{Generation cost} = \frac{\text{queries} \times \text{input tokens}}{10^6} \times p_{in} + \frac{\text{queries} \times \text{output tokens}}{10^6} \times p_{out}&lt;br&gt;
With 5 chunks of 500 tokens, plus a 500-token system prompt and the question, a typical request carries about 3,500 input tokens and returns about 400 output tokens. At $2 and $10 per million (Claude Sonnet 5.5 standard, as used in our batch vs real-time article):&lt;br&gt;
Per query: 3,500 × $2 ÷ 10⁶ + 400 × $10 ÷ 10⁶ = $0.007 + $0.004 = $0.011&lt;/p&gt;

&lt;h2&gt;
  
  
  Per 100,000 queries: $1,100
&lt;/h2&gt;

&lt;p&gt;Retrieved context, not the answer, is most of the input. Every extra chunk adds about $0.001 per query at these prices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost model: three RAG deployments (illustrative)
&lt;/h2&gt;

&lt;p&gt;In all three scenarios, LLM generation is 78–84% of monthly infrastructure cost and the vector database is under 10%. All use the assumptions above.&lt;br&gt;
Scenario A: internal knowledge assistant&lt;br&gt;
50 million-token corpus (100,000 chunks, 0.72 GB index); 100,000 questions a month.&lt;br&gt;
One-time setup: embedding $1.15 + initial writes $2.86 = about $4&lt;br&gt;
Vector database: storage $0.24 + reads $1.14 + churn writes $0.29 = $1.67, billed at the $50 minimum&lt;br&gt;
Content churn re-embedding: $0.11&lt;br&gt;
Query embedding: $0.06&lt;br&gt;
Reranking: 100 × $2 = $200&lt;br&gt;
LLM generation: 100,000 × $0.011 = $1,100&lt;br&gt;
Monthly total: about $1,350, of which generation is 81%&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario B: customer support assistant
&lt;/h2&gt;

&lt;p&gt;200 million-token corpus (400,000 chunks, 2.86 GB index); 500,000 questions a month.&lt;br&gt;
One-time setup: embedding $4.60 + initial writes $11.44 = about $16&lt;br&gt;
Vector database: storage $0.94 + reads $22.89 + churn writes $1.14 = $24.97, billed at the $50 minimum&lt;br&gt;
Content churn re-embedding: $0.46&lt;br&gt;
Query embedding: $0.30&lt;br&gt;
Reranking: 500 × $2 = $1,000&lt;br&gt;
LLM generation: 500,000 × $0.011 = $5,500&lt;br&gt;
Monthly total: about $6,551, of which generation is 84%&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario C: enterprise document search
&lt;/h2&gt;

&lt;p&gt;5 billion-token corpus (10 million chunks, 71.5 GB index in one namespace); 2 million questions a month.&lt;br&gt;
One-time setup: embedding $115 + initial writes $286 = about $401&lt;br&gt;
Vector database: storage $23.60 + reads $2,288.64 + churn writes $28.61 = $2,341&lt;br&gt;
Content churn re-embedding: $11.50&lt;br&gt;
Query embedding: $1.20&lt;br&gt;
Reranking: 2,000 × $2 = $4,000&lt;br&gt;
LLM generation: 2,000,000 × $0.011 = $22,000&lt;br&gt;
Monthly total: about $28,354, of which generation is 78%&lt;br&gt;
What changes the picture&lt;br&gt;
Partitioning Scenario C into ten equal namespaces would cut vector read cost about tenfold, to roughly $229 a month.&lt;br&gt;
Per-token reranking, if the reported Rerank 5 prices hold, would cut reranking to about $20, $100 and $400 a month in A, B and C.&lt;br&gt;
A cheaper model for generation moves the total far more than any retrieval change. Test quality first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Costs teams forget
&lt;/h2&gt;

&lt;p&gt;The infrastructure bill above is the smaller part of running RAG in production. People and process add more.&lt;br&gt;
Engineering. Someone owns ingestion pipelines, chunking strategy, retrieval tuning, access controls and upgrades. Using our maintenance article's figures, half a mid-level AI engineer costs about $6,336 a month from a Latin America team ($76,032 a year) or $11,913 in-house in the US ($142,955 a year). In Scenario A that is several times the infrastructure bill; in Scenario B it roughly equals it (Latin America) or nearly doubles it (in-house).&lt;br&gt;
Evaluation. RAG quality fails quietly: the wrong chunk is retrieved and the model answers confidently anyway. Budget a test set of real questions with known correct sources, rerun on every change, plus human review of sampled answers.&lt;br&gt;
Re-indexing projects. Changing chunk size, embedding model or metadata schema means rebuilding the index. The API bill is small; the engineering and testing time is not.&lt;br&gt;
Access control. Enterprise RAG must respect who is allowed to see which document. Mapping permissions into metadata filters and keeping them in sync is real work, and a mistake is a data leak.&lt;br&gt;
Observability. Tracing which chunks were retrieved for each answer is how you debug wrong answers. See our maintenance article for tool pricing.&lt;br&gt;
Document parsing at scale. Tables, scans and slides may need specialist extraction services or OCR.&lt;br&gt;
Environments. A separate staging index for testing changes doubles storage and write costs, though at these prices that is usually small.&lt;/p&gt;

&lt;h2&gt;
  
  
  Levers that cut RAG cost without hurting quality
&lt;/h2&gt;

&lt;p&gt;Because generation dominates, the most effective savings reduce the tokens sent to the model. Test every change against your evaluation set.&lt;br&gt;
Retrieve fewer, better chunks. Reranking 20 results and sending the best 3 instead of 5 cuts about 1,000 input tokens per query: roughly $2 per 1,000 queries at the prices above, often with no loss in answer quality.&lt;br&gt;
Right-size chunks. Smaller chunks mean less irrelevant text per retrieved passage. Too small and context is lost; test a few sizes.&lt;br&gt;
Cache the system prompt. It repeats on every request. Prompt caching cuts its cost sharply on providers that support it (see our batch vs real-time article).&lt;br&gt;
Route by difficulty. Send simple, high-confidence questions to a smaller, cheaper model and reserve the larger one for hard cases.&lt;br&gt;
Cache frequent answers. Many support and internal questions repeat. Serving a stored answer for a repeated question costs nothing in generation.&lt;br&gt;
Cap output length. Ask for concise answers with citations, not essays. Output tokens cost five times input tokens at the prices used here.&lt;br&gt;
Partition the index. Separate namespaces by tenant, department or product line, so each search scans only what it needs.&lt;br&gt;
Shorten embeddings if quality allows. Fewer dimensions mean smaller storage and, on read-unit pricing, cheaper queries. Test recall first.&lt;br&gt;
Batch offline work. Re-indexing, evaluation runs and summary generation can use batch APIs at half price.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where CodingCops fits
&lt;/h2&gt;

&lt;p&gt;Disclosure: the author works with CodingCops. This section uses only the company's published descriptions and includes no CodingCops pricing, client results or savings claims.&lt;br&gt;
CodingCops is a Chicago-headquartered software company (Built In Chicago). Its company profile lists AI and machine learning, cloud and DevOps, custom software development, and dedicated engineering teams among its services (Outsource Accelerator), and it offers engagements for specific projects, short-term initiatives or long-term development (codingcops.com).&lt;br&gt;
The ongoing engineering behind a RAG pipeline, ingestion, retrieval tuning, access control and evaluation, is the kind of work a dedicated team can cover. Whoever builds it, ask for a written cost estimate using the components above, an evaluation set you own, and documentation of how permissions map into retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How much does a RAG pipeline cost per month?
&lt;/h2&gt;

&lt;p&gt;In our illustrative model, about $1,350 a month for 100,000 questions, $6,550 for 500,000, and $28,350 for 2 million, infrastructure only. Engineering and evaluation come on top.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the most expensive part of RAG?
&lt;/h2&gt;

&lt;p&gt;LLM generation: 78–84% of infrastructure cost in every scenario we modeled, because each answer sends thousands of tokens of retrieved text to the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does it cost to embed documents?
&lt;/h2&gt;

&lt;p&gt;Very little. At $0.02 per million tokens, embedding 5 billion tokens costs about $115 once. Parsing messy documents usually costs more than the embeddings.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does a vector database cost?
&lt;/h2&gt;

&lt;p&gt;For small and mid-sized indexes, often just the plan minimum, such as Pinecone's $50 a month. On read-unit pricing, query cost grows with index size, so very large single indexes can cost thousands a month unless partitioned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do I need a reranker?
&lt;/h2&gt;

&lt;p&gt;Not always, but reranking lets you send fewer, better chunks to the LLM, which usually saves more on generation than the reranker costs. Test on your own questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can I reduce RAG costs?
&lt;/h2&gt;

&lt;p&gt;Send fewer chunks, cache the system prompt and frequent answers, route easy questions to a smaller model, cap output length and partition large indexes.&lt;/p&gt;

</description>
      <category>infrastructure</category>
      <category>llm</category>
      <category>rag</category>
    </item>
    <item>
      <title>The Cost of Self-Hosting Open-Source LLMs: GPUs, Staffing, and Operations</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Fri, 06 Nov 2026 14:13:22 +0000</pubDate>
      <link>https://dev.to/ericthompson21/the-cost-of-self-hosting-open-source-llms-gpus-staffing-and-operations-37ib</link>
      <guid>https://dev.to/ericthompson21/the-cost-of-self-hosting-open-source-llms-gpus-staffing-and-operations-37ib</guid>
      <description>&lt;p&gt;Self-hosting an open-source LLM in production costs roughly $150,000 to $2 million or more per year in 2026. GPUs are only part of the bill: for most companies, the engineers who run the stack cost as much as or more than the hardware. Self-hosting usually beats paying for an API only at high, steady volume or when data rules require it.&lt;/p&gt;

&lt;p&gt;• Small deployment, $150K–$300K a year: a 7B–32B model on 1–2 rented GPUs with business-hours load. GPUs run $15K–$45K a year; staffing is part of 1–2 engineers' time, about $100K–$200K.&lt;br&gt;
• Mid-size deployment, $400K–$900K a year: a 70B-class model on 4–8 rented H100s or H200s with high availability. GPUs run $90K–$300K a year; staffing is 2–3 engineers, about $250K–$500K.&lt;br&gt;
• Large deployment, $1.2M–$3M a year: a large mixture-of-experts model on 16–32 H200s or B200s across regions. GPUs run $500K–$1.5M a year; staffing is 4–6 engineers, about $600K–$1.2M.&lt;/p&gt;

&lt;p&gt;These are planning estimates as of November 2026, using specialist GPU cloud rates and US-market salaries. Teams in lower-cost regions, or those that share engineers with existing platform teams, can land well below them.&lt;/p&gt;

&lt;p&gt;The most common mistake is pricing a GPU-hour and stopping there. A self-hosted model also needs a serving stack, autoscaling, monitoring, security reviews, model upgrades and an on-call rotation. Those costs exist whether you serve one request a day or a million.&lt;/p&gt;

&lt;h2&gt;
  
  
  GPU costs: renting vs buying
&lt;/h2&gt;

&lt;p&gt;For most companies, renting GPUs from a specialist cloud is the cheapest way to start self-hosting, and buying only pays off at near-constant utilization. Prices vary more by provider than by chip, so shopping around matters more than picking the newest GPU.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud rental prices in late 2026
&lt;/h2&gt;

&lt;p&gt;• H100 (80GB): roughly $2.00–$4.00 per GPU-hour on specialist clouds such as Lambda, CoreWeave, RunPod and Crusoe. GMI Cloud's 2026 analysis puts hyperscaler H100 bundles at $5–$8 per GPU-hour before commitments.&lt;br&gt;
• H200 (141GB): roughly $2.60–$6.30 per GPU-hour on specialist clouds. The extra memory makes it the better fit for 70B-class models and long context.&lt;/p&gt;

&lt;p&gt;• B200: roughly $4.00–$8.60 per GPU-hour, with capacity still tight in 2026. AWS Capacity Blocks list about $5.19 per GPU-hour for H100 and $10.58 for B200.&lt;/p&gt;

&lt;p&gt;• Smaller cards (L40S, A100): about $1–$2.50 per GPU-hour, often enough for 7B–14B models.&lt;/p&gt;

&lt;p&gt;Reserved and committed contracts typically cut 20–40% off on-demand rates. Spot or preemptible capacity is cheaper still, but only suits batch work that can tolerate interruption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Buying GPUs outright
&lt;/h2&gt;

&lt;p&gt;• A single H100 costs about $25,000–$40,000, and a full 8-GPU H200 server about $370,000, according to 2026 market data.&lt;br&gt;
• 8-GPU B200 servers run roughly $400,000–$500,000, per IntuitionLabs' 2026 price index.&lt;/p&gt;

&lt;p&gt;• Add colocation or data center space, power, cooling, networking and spares. An 8-GPU server can draw 10+ kilowatts.&lt;br&gt;
The break-even is longer than it looks. One worked example from Spheron shows a $35,000 H100 needs about 17,400 hours of use at a $2.01 rental rate to pay for itself: roughly two years at 24/7 utilization, or six years at eight hours a day. Hardware also loses value as each new GPU generation arrives.&lt;/p&gt;

&lt;h2&gt;
  
  
  How many GPUs does your model need?
&lt;/h2&gt;

&lt;p&gt;Memory decides the minimum, and traffic decides the rest.&lt;br&gt;
• 7B–14B models: one 24–48GB card, or one H100 for high throughput.&lt;br&gt;
• 32B models: one H100 at FP8, or two smaller cards.&lt;br&gt;
• 70B models: one 80GB H100 at FP8 just fits, as Spheron's H100 benchmarks note; two GPUs or one H200 give headroom for longer context and more users.&lt;/p&gt;

&lt;p&gt;• Large mixture-of-experts models (DeepSeek-class, gpt-oss-120B and larger): a full 8-GPU node or more.&lt;/p&gt;

&lt;p&gt;Then double it for production. High availability means at least two replicas, and peak traffic needs spare capacity on top.&lt;/p&gt;

&lt;h2&gt;
  
  
  Utilization is the number that matters
&lt;/h2&gt;

&lt;p&gt;Cost per token depends on how busy the GPUs are. SemiAnalysis InferenceX benchmarks show Llama 3.3 70B on one H100 serving about 1,465 tokens per second at interactive speeds, roughly $0.25 per million tokens. That figure assumes the GPU is fully loaded. At 20% average utilization, the real cost per token is five times higher, which is where many self-hosted deployments quietly lose money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Staffing costs: the line item most budgets miss
&lt;/h2&gt;

&lt;p&gt;People are usually the largest cost of self-hosting, because a production LLM needs engineers who can run GPUs, serving software and on-call support around the clock. With an API, the provider carries that work; when you self-host, you do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The roles you need
&lt;/h2&gt;

&lt;p&gt;• ML infrastructure or platform engineer: runs GPU clusters, Kubernetes, autoscaling and the inference engine (vLLM, SGLang or TensorRT-LLM). &lt;/p&gt;

&lt;p&gt;Second Talent's 2026 benchmarks put US salaries at $150,000–$220,000.&lt;/p&gt;

&lt;p&gt;• MLOps engineer: handles model deployment, versioning, evaluation, monitoring and upgrades. The same source puts US pay at $130,000–$200,000, and KORE1's 2026 guide notes senior roles at top firms pass $300,000 in total compensation.&lt;/p&gt;

&lt;p&gt;• Applied ML engineer (optional): tunes prompts, fine-tunes models and runs quality evaluations.&lt;/p&gt;

&lt;p&gt;• Share of SRE, security and FinOps time: incident response, access controls, cost tracking.&lt;/p&gt;

&lt;p&gt;Add 25–40% on top of salary for benefits, taxes, equipment and recruiting to get the fully loaded cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  How many engineers?
&lt;/h2&gt;

&lt;p&gt;• Small deployment: 0.5–1.5 engineers, often borrowed from an existing platform team.&lt;/p&gt;

&lt;p&gt;• Mid-size production deployment: 2–3 engineers, enough for a real on-call rotation.&lt;/p&gt;

&lt;p&gt;• Large or multi-model platform: 4–6 or more, with dedicated owners for serving, evaluation and infrastructure.&lt;/p&gt;

&lt;p&gt;A 24/7 on-call rotation is hard to staff sustainably with fewer than three people. This is the hidden floor on self-hosting cost: even a lightly used model needs someone awake when it breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hiring timeline is a cost too
&lt;/h2&gt;

&lt;p&gt;GPU infrastructure skills are scarce, and senior hires often take three to six months to land. During that time the project either waits or runs on an API anyway. Many companies close the gap with a partner team that runs the stack until in-house staff are ready to take over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operations costs beyond GPUs and people
&lt;/h2&gt;

&lt;p&gt;Operations typically add 15–30% on top of GPU spend, covering the serving stack, storage, networking, monitoring, security and the steady work of upgrading models. None of it is optional in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Serving stack and orchestration
&lt;/h2&gt;

&lt;p&gt;Open-source inference engines such as vLLM, SGLang and TensorRT-LLM are free to use, but not free to run. Expect to budget engineering time for Kubernetes or a managed GPU platform, a load balancer and API gateway, request queuing, autoscaling and an OpenAI-compatible API layer so applications can switch models easily. Managed control planes and enterprise support contracts, where used, typically add $1,000–$10,000 a month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Storage, networking and egress
&lt;/h2&gt;

&lt;p&gt;Model weights for a 70B model take about 140GB at 16-bit precision, and teams usually keep several versions. Add fast local NVMe for loading, object storage for checkpoints and logs, and data egress fees if traffic leaves the cloud. This line often lands at $500–$5,000 a month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring and evaluation
&lt;/h2&gt;

&lt;p&gt;You need to see latency, throughput, GPU utilization, error rates and output quality. Tools such as Prometheus, Grafana, Datadog, Langfuse or Arize cost $200–$3,000 a month at typical scale, plus the work of maintaining evaluation datasets so each model upgrade can be checked before release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security and compliance
&lt;/h2&gt;

&lt;p&gt;Self-hosting is often chosen for data control, but that control has to be built: network isolation, encryption, access logging, vulnerability patching of inference containers, and audits for SOC 2, HIPAA or GDPR. Budget security review time for every new model, since open weights from public repositories need vetting before production use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model upgrades
&lt;/h2&gt;

&lt;p&gt;Open-source models improve every few months. Each upgrade means benchmarking, re-quantizing, load testing and rolling out without downtime. Teams that skip upgrades save effort but fall behind API models on quality, which erodes the case for self-hosting over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Power and facilities (owned hardware only)
&lt;/h2&gt;

&lt;p&gt;If you buy GPUs, add colocation space, power and cooling. A single 700W H100 draws about 6,100 kWh a year; with server overhead and cooling, an 8-GPU node can cost $15,000–$30,000 a year in power and space at typical colocation rates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-hosting vs API: where is the break-even?
&lt;/h2&gt;

&lt;p&gt;Self-hosting a 70B-class model usually breaks even with a comparable API somewhere around 20–50 billion tokens a month, depending mostly on how much staff time the deployment needs. Below that, the fixed cost of engineers outweighs any savings on tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  The worked example
&lt;/h2&gt;

&lt;p&gt;Take a company that wants to run a 70B-class open model in production, with high availability, on four rented H100s.&lt;/p&gt;

&lt;p&gt;• GPUs: 4 H100s at $2.50 an hour, running 24/7, cost about $7,300 a month.&lt;br&gt;
• Operations: serving, storage, monitoring and security at about 20% of GPU spend add roughly $1,460 a month.&lt;/p&gt;

&lt;p&gt;• Staffing: 2.5 engineers at a $200,000 fully loaded cost each come to about $41,700 a month.&lt;/p&gt;

&lt;p&gt;• Total: roughly $50,500 a month, or about $600,000 a year.&lt;/p&gt;

&lt;p&gt;At 50% average utilization, those four GPUs serve on the order of 7–8 billion tokens a month. At that volume, a comparable small or mid-tier API at a blended $2 per million tokens would cost about $15,000 a month. The API is more than three times cheaper.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding your break-even
&lt;/h2&gt;

&lt;p&gt;The math changes as volume grows, because each extra GPU is cheap compared with the fixed team.&lt;/p&gt;

&lt;p&gt;• Marginal cost of self-hosting: each additional H100 at 50% utilization adds about 1.9 billion tokens a month for roughly $2,200 including operations, or about $1.15 per million tokens.&lt;/p&gt;

&lt;p&gt;• Marginal cost of the API: about $2 per million tokens in this example.&lt;/p&gt;

&lt;p&gt;• Break-even: the $41,700 monthly staffing cost divided by the $0.85 saving per million tokens gives about 49 billion tokens a month, or roughly 1.6 billion tokens a day.&lt;/p&gt;

&lt;p&gt;• With shared staff: if one engineer from an existing platform team can run the stack, the break-even drops to about 20 billion tokens a month.&lt;/p&gt;

&lt;h2&gt;
  
  
  As a formula:
&lt;/h2&gt;

&lt;p&gt;\text{Break-even tokens per month} = \frac{\text{Fixed monthly staff and ops cost}}{\text{API price per token} - \text{Self-hosted marginal cost per token}}&lt;br&gt;
What moves the number&lt;br&gt;
• Utilization: doubling average GPU utilization roughly halves self-hosted marginal cost.&lt;/p&gt;

&lt;p&gt;• API pricing: API prices have been falling fast. Epoch AI found the price to reach a given performance level has dropped between 9x and 900x a year depending on the task, which keeps pushing the break-even higher.&lt;/p&gt;

&lt;p&gt;• Model quality: comparing a self-hosted 70B model to a frontier API is not like for like. If the task truly needs frontier quality, the comparison is against a much pricier API, but the open model may not do the job.&lt;/p&gt;

&lt;p&gt;• Engineering reuse: companies that already run GPU platforms for other workloads add LLM serving at a fraction of the staffing cost.&lt;/p&gt;

&lt;p&gt;All figures here are illustrative planning numbers; plug in your own token volume, utilization and salaries before deciding.&lt;/p&gt;

&lt;h2&gt;
  
  
  When self-hosting is worth it
&lt;/h2&gt;

&lt;p&gt;Self-hosting makes sense when at least one of four conditions holds: very high steady volume, strict data residency, a need for deep customization, or latency an API cannot meet. If none apply, an API or a managed open-model endpoint is almost always cheaper.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good reasons to self-host
&lt;/h2&gt;

&lt;p&gt;• Sustained high volume: billions of tokens a day with predictable traffic, where GPUs stay busy.&lt;/p&gt;

&lt;p&gt;• Data control: regulated data, government or defense work, or contracts that forbid sending data to third-party model providers.&lt;/p&gt;

&lt;p&gt;• Customization: fine-tuned or distilled models, custom decoding or architectures that hosted APIs do not offer.&lt;/p&gt;

&lt;p&gt;• Latency and locality: on-premise or edge deployments, or tight latency budgets close to your users.&lt;/p&gt;

&lt;p&gt;• Vendor independence: a strategic need to avoid dependence on any single model provider.&lt;/p&gt;

&lt;h2&gt;
  
  
  Weak reasons to self-host
&lt;/h2&gt;

&lt;p&gt;• "Open-source is free": the weights are free; running them is not.&lt;br&gt;
• Low or spiky traffic: idle GPUs cost the same as busy ones.&lt;br&gt;
• Cost savings at prototype stage: early products rarely have the volume to justify a team.&lt;/p&gt;

&lt;h2&gt;
  
  
  The middle path: managed open-model endpoints
&lt;/h2&gt;

&lt;p&gt;Providers such as Together AI, Fireworks, Groq, AWS Bedrock and Azure AI host open models like Llama, Qwen and DeepSeek and charge per token. You keep model choice and avoid most staffing cost. Many teams start here, then move their highest-volume workload in-house once traffic proves the case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seven ways to cut self-hosting cost
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Quantize: FP8 or INT4 versions of a model often cut GPU memory needs by half or more with little quality loss.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right-size the model: a well-tuned 8B–32B model often beats a generic 70B model on a narrow task, at a fraction of the cost.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Batch aggressively: continuous batching in vLLM or SGLang raises throughput per GPU sharply.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scale to demand: autoscale replicas down overnight and at weekends instead of running peak capacity 24/7.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use reserved capacity for the baseline and on-demand for peaks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Route by difficulty: send easy requests to a small self-hosted model and hard ones to a frontier API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Track cost per million tokens, not cost per GPU-hour, and review it every month.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;How much does it cost to self-host an LLM?&lt;br&gt;
Self-hosting an open-source LLM in production typically costs $150,000 to $3 million a year in 2026. GPUs account for $15,000 to $1.5 million of that, and the engineers who run the stack usually cost as much or more.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does it cost to run Llama 70B?
&lt;/h2&gt;

&lt;p&gt;Running a 70B-class model like Llama 3.3 70B with high availability on four rented H100s costs about $7,300 a month in GPUs alone, or roughly $88,000 a year. Adding operations and a small engineering team brings the total to around $600,000 a year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is self-hosting an LLM cheaper than using an API?
&lt;/h2&gt;

&lt;p&gt;Only at high, steady volume. For a 70B-class model, self-hosting typically breaks even with a comparable API at about 20–50 billion tokens a month. Below that, APIs are cheaper because you are not paying a team to run infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does an H100 GPU cost per hour?
&lt;/h2&gt;

&lt;p&gt;An H100 rents for roughly $2 to $4 per GPU-hour on specialist clouds in late 2026, and $5 to $8 or more on hyperscalers before discounts. Buying one costs about $25,000 to $40,000.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should I rent or buy GPUs for LLM inference?
&lt;/h2&gt;

&lt;p&gt;Rent unless you can keep GPUs busy around the clock for two years or more. Buying adds power, cooling, space and depreciation, and a $35,000 H100 takes roughly two years of 24/7 use to beat rental prices.&lt;/p&gt;

&lt;h2&gt;
  
  
  How many engineers do I need to self-host an LLM?
&lt;/h2&gt;

&lt;p&gt;Plan for 2–3 engineers for a single production model with 24/7 support, and 4–6 for a multi-model platform. Small internal deployments can run on part of one engineer's time if an existing platform team supports them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the cheapest way to use open-source LLMs?
&lt;/h2&gt;

&lt;p&gt;For most companies, a managed open-model endpoint such as Together AI, Fireworks or AWS Bedrock is cheapest. You pay per token, keep the freedom to switch models, and avoid GPU and staffing costs until volume justifies self-hosting.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>infrastructure</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Comparing Batch and Real-Time LLM Inference Economics</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 12:11:17 +0000</pubDate>
      <link>https://dev.to/ericthompson21/comparing-batch-and-real-time-llm-inference-economics-3fmi</link>
      <guid>https://dev.to/ericthompson21/comparing-batch-and-real-time-llm-inference-economics-3fmi</guid>
      <description>&lt;p&gt;Batch inference costs 50% less than real-time inference at Anthropic, OpenAI and Google, in exchange for results that can take up to 24 hours. For a workload of one million document classifications a month on a mid-tier model, that is roughly $7,000 a month in real time versus $3,500 in batch, about $42,000 a year saved (illustrative calculation below).&lt;br&gt;
The catch is that only work nobody is waiting on can move to batch: enrichment, classification, evaluations, reports, backfills. Anything a user sees live, such as chat, search answers or agents acting in a session, stays real-time. For those, prompt caching is the main cost lever, and at Anthropic its discount stacks with batch.&lt;br&gt;
The practical move for most companies is to split their AI traffic in two. Run interactive requests in real time with caching, and route everything else through a batch queue. The rest of this article shows how to size each part.&lt;/p&gt;

&lt;h2&gt;
  
  
  How batch and real-time inference differ
&lt;/h2&gt;

&lt;p&gt;The price difference reflects one tradeoff: the provider decides when your request runs.&lt;br&gt;
Real-time (standard) inference returns a response in seconds, usually streamed. You pay full list price, and your throughput is capped by per-minute rate limits.&lt;br&gt;
Batch inference accepts a file or list of many requests, processes them when capacity is free, and returns all results together. Anthropic's Message Batches API, for example, accepts up to 100,000 requests or 256 MB per batch. Most batches finish within an hour, but any request not done within 24 hours expires, and results stay downloadable for 29 days (Anthropic docs).&lt;br&gt;
Middle tiers now exist between the two. OpenAI's flex processing charges Batch API rates for ordinary synchronous calls that are slower and can be refused when capacity is short; refused requests return an error and are not charged (OpenAI docs). Google's Gemini API offers a Flex tier at 50% off with a 1–15 minute target, and a Priority tier that costs 75–100% more for the fastest, non-sheddable service (Google docs).&lt;br&gt;
So the real choice is not two modes but a range. Pay more for guaranteed speed, standard price for normal interactive use, or half price for work that can wait minutes to hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Provider pricing: batch discounts and caching (sourced)
&lt;/h2&gt;

&lt;p&gt;All three major API providers price batch at half of standard, so the decision is about workload fit, not vendor choice.&lt;br&gt;
&lt;strong&gt;Anthropic&lt;/strong&gt;: Message Batches cost 50% of standard prices on input and output tokens. Prompt caching discounts stack with batch pricing, though cache hits in batch are best-effort, typically 30–98% depending on traffic (Anthropic batch docs). Example batch prices: Claude Sonnet 5.5 at $1 input and $5 output per million tokens; Claude Opus 5.5 at $2 and $10. Standard prices are double.&lt;br&gt;
&lt;strong&gt;OpenAI&lt;/strong&gt;: launched its Batch API in April 2024 at a 50% discount with a completion window of up to 24 hours (Simon Willison). Flex processing gives Batch API rates on synchronous calls, and prompt caching can add further discounts (OpenAI docs).&lt;br&gt;
Google Gemini: Batch mode is 50% off with a target turnaround of up to 24 hours and input files up to 2 GB. Flex is also 50% off. Context caching gives a 90% discount on cached tokens plus a storage charge (Google docs, updated October 2026).&lt;/p&gt;

&lt;h2&gt;
  
  
  How prompt caching changes the numbers
&lt;/h2&gt;

&lt;p&gt;When many requests share a long prefix, such as a system prompt, policy document or product catalog, the provider can reuse it. Reading cached tokens costs a small fraction of normal input price: 10% of base input on standard Anthropic models, with lower multipliers reported for some newer models, and a premium of 1.25 to 2 times base input to write the cache. This model uses the conservative 10% read price. Verify current multipliers before budgeting.&lt;br&gt;
List prices change frequently and enterprise contracts often differ. Treat every figure here as a November 2026 snapshot.&lt;br&gt;
*&lt;em&gt;Cost model: three workloads (illustrative)&lt;br&gt;
**Batch halves the bill for work that can wait; caching does most of the saving for work that cannot. All three scenarios use Claude Sonnet 5.5 list prices (standard $2 input and $10 output per million tokens; batch $1 and $5). Volumes are invented examples, and cache-write charges are left out because they are small when one prefix serves many requests.&lt;br&gt;
**The formula:&lt;br&gt;
*&lt;/em&gt;\text{Monthly cost} = \frac{\text{requests} \times \text{input tokens}}{10^6} \times p_{in} + \frac{\text{requests} \times \text{output tokens}}{10^6} \times p_{out}&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 1: document classification and enrichment
&lt;/h2&gt;

&lt;p&gt;1 million documents a month, 2,000 input tokens and 300 output tokens each. Nobody waits on individual results.&lt;br&gt;
Input: 2,000 million tokens. Output: 300 million tokens.&lt;br&gt;
Real-time: 2,000 × $2 + 300 × $10 = $4,000 + $3,000 = $7,000 a month&lt;br&gt;
Batch: 2,000 × $1 + 300 × $5 = $2,000 + $1,500 = $3,500 a month&lt;br&gt;
Saving: $3,500 a month, $42,000 a year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 2: customer support assistant
&lt;/h2&gt;

&lt;p&gt;500,000 conversations a month, 4,000 input tokens each (of which 3,000 are a shared system prompt and knowledge snippet), and 400 output tokens. Customers wait live, so batch is not an option.&lt;br&gt;
Input: 2,000 million tokens, of which 1,500 million are cacheable. Output: 200 million tokens.&lt;br&gt;
Real-time, no caching: 2,000 × $2 + 200 × $10 = $4,000 + $2,000 = $6,000 a month&lt;br&gt;
Real-time with caching: 1,500 × $0.20 + 500 × $2 + 200 × $10 = $300 + $1,000 + $2,000 = $3,300 a month&lt;br&gt;
Saving: $2,700 a month (45%), with no change to user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 3: nightly evaluation and reporting pipeline
&lt;/h2&gt;

&lt;p&gt;200,000 requests a month, run overnight, 10,000 input tokens each (8,000 shared context) and 1,000 output tokens. Results are needed by morning.&lt;br&gt;
Input: 2,000 million tokens, of which 1,600 million are shared. Output: 200 million tokens.&lt;br&gt;
Real-time: 2,000 × $2 + 200 × $10 = $6,000 a month&lt;br&gt;
Batch: 2,000 × $1 + 200 × $5 = $3,000 a month&lt;br&gt;
Batch plus caching, assuming a 50% cache hit rate on the shared context (Anthropic describes batch cache hits as best-effort): 800 million cached × $0.10 + 1,200 million uncached × $1 + 200 × $5 = $80 + $1,200 + $1,000 = $2,280 a month&lt;/p&gt;

&lt;h2&gt;
  
  
  Saving against real-time: $3,720 a month (62%).
&lt;/h2&gt;

&lt;p&gt;Notice what dominates once input is discounted: output tokens. In Scenario 3, output is 44% of the batch-plus-cache bill. Shorter, structured outputs are often the next lever.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-hosted inference: utilization decides the math
&lt;/h2&gt;

&lt;p&gt;If you run an open-weight model on rented GPUs, you pay for GPU hours whether or not requests arrive. Batch workloads matter here for a different reason: they keep GPUs busy.&lt;br&gt;
Sourced GPU prices. An October 2026 survey of H100 rental prices found specialist clouds listing roughly $2 to $4.50 per GPU-hour on demand, and hyperscalers roughly $7 to $12 (IntuitionLabs). Several providers raised list prices in 2026.&lt;br&gt;
Illustrative calculation. Assume a $3 GPU-hour and a model that sustains 1,000 output tokens per second per GPU at full load. That throughput is an assumption for illustration; real figures vary widely by model size, hardware and serving software.&lt;br&gt;
At full load: 1,000 × 3,600 = 3.6 million tokens an hour, so $3 ÷ 3.6 = $0.83 per million tokens&lt;br&gt;
At 70% utilization: $0.83 ÷ 0.70 = $1.19 per million&lt;br&gt;
At 30% utilization: $0.83 ÷ 0.30 = $2.78 per million&lt;br&gt;
Interactive traffic is spiky, so real-time clusters are sized for peaks and sit partly idle. Batch jobs fill those idle hours, which is why self-hosting teams run backfills and evaluations overnight on the same hardware.&lt;br&gt;
These per-token numbers are not directly comparable to API prices. They use a different model, and they exclude the engineers who keep the serving stack running, monitoring, and redundancy. Self-hosting usually makes economic sense only at sustained high volume, or when data cannot leave your environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which workloads belong where
&lt;/h2&gt;

&lt;p&gt;Ask one question of every AI call: is a person or a live process waiting for this answer right now?&lt;/p&gt;

&lt;h2&gt;
  
  
  Good batch candidates
&lt;/h2&gt;

&lt;p&gt;Classifying, tagging or extracting fields from documents, tickets and records&lt;br&gt;
Enriching CRM or product catalogs&lt;br&gt;
Generating embeddings or summaries for search indexes&lt;br&gt;
Running evaluation suites and regression tests on prompts or models&lt;br&gt;
Overnight reports, digests and analytics narratives&lt;br&gt;
Backfilling historical data after a prompt or model change&lt;br&gt;
Generating synthetic data or test cases&lt;/p&gt;

&lt;h2&gt;
  
  
  Must stay real-time
&lt;/h2&gt;

&lt;p&gt;Chat assistants and customer support&lt;br&gt;
Search answers and in-app copilots&lt;br&gt;
Agents taking actions inside a user's session&lt;br&gt;
Fraud, moderation or routing decisions that block a transaction&lt;/p&gt;

&lt;h2&gt;
  
  
  Middle ground: flex tiers
&lt;/h2&gt;

&lt;p&gt;Work that can wait minutes but not hours, such as a background summary a user checks later, fits flex tiers. They give batch-level prices on ordinary synchronous calls, but requests can be refused or delayed, so your code needs a fallback to standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hybrid pattern
&lt;/h2&gt;

&lt;p&gt;Most production systems end up with three lanes. Interactive traffic runs real-time with prompt caching. Deferrable traffic goes into a queue that submits batches on a schedule. Anything urgent that a flex call cannot serve falls back to standard. The engineering is modest, and the savings apply to every token in the deferrable lane.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering costs and risks beyond the token bill
&lt;/h2&gt;

&lt;p&gt;The batch discount is only real if the pipeline around it is reliable; budget engineering time for these pieces.&lt;br&gt;
Queue and scheduler. Requests must be collected, grouped within batch size limits, and submitted on a schedule.&lt;br&gt;
Result handling. Results arrive together, so each one must be matched back to its source record by ID and written to the right place.&lt;br&gt;
Expiry and retries. Requests not completed within the provider's window expire. You need logic to detect and resubmit them, and an alert if a whole batch fails.&lt;br&gt;
Partial failures. Some requests in a batch can fail while others succeed. Track status per request, not per batch.&lt;br&gt;
Result retention. Anthropic keeps batch results for 29 days. Download and store them before then.&lt;br&gt;
Freshness. A result produced overnight reflects yesterday's data. Check that downstream users accept that.&lt;br&gt;
Cost visibility. Tag requests by lane and team so finance sees what batch is actually saving.&lt;br&gt;
Two further risks apply to every mode. Provider prices and model versions change often, so a budget built on one month's list prices can drift. And a cheaper token bill does not help if output quality drops; rerun your evaluation set whenever you change model, mode or prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where CodingCops fits
&lt;/h2&gt;

&lt;p&gt;Disclosure: the author works with CodingCops. This section uses only the company's published descriptions and includes no CodingCops pricing, client results or savings claims.&lt;br&gt;
CodingCops is a Chicago-headquartered software company founded in 2010 (Built In Chicago). Its company profile lists AI and machine learning, cloud and DevOps, custom software development, and dedicated engineering teams among its services (Outsource Accelerator).&lt;br&gt;
The work described in this article, separating interactive and deferrable traffic, building a batch queue with retries, and tracking cost per lane, sits at the intersection of AI engineering and DevOps. Teams without that capacity in-house can add it through a dedicated team or staff augmentation, which CodingCops offers for specific projects, short-term initiatives or ongoing development (codingcops.com).&lt;br&gt;
[Marketing to verify before publishing] Confirm the description wording. Do not add token-cost savings or client results without evidence and approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How much cheaper is batch LLM inference?
&lt;/h2&gt;

&lt;p&gt;Anthropic, OpenAI and Google all price batch at 50% of standard rates, as of November 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  How long does a batch job take?
&lt;/h2&gt;

&lt;p&gt;Up to 24 hours at all three providers. Anthropic says most batches finish within an hour; requests not done within 24 hours expire.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can I combine batch with prompt caching?
&lt;/h2&gt;

&lt;p&gt;At Anthropic, yes: the discounts stack, though cache hits in batch are best-effort. Check each provider's current docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is flex processing?
&lt;/h2&gt;

&lt;p&gt;A synchronous tier priced like batch. Calls are slower and may be refused when capacity is short, so you need a fallback. OpenAI and Google both offer one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is self-hosting cheaper than batch APIs?
&lt;/h2&gt;

&lt;p&gt;Only at sustained high volume with high GPU utilization, and after counting the engineers who run it. Idle GPUs make self-hosted tokens expensive quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What share of AI workloads can move to batch?
&lt;/h2&gt;

&lt;p&gt;It depends entirely on the product. Audit your own traffic: anything nobody waits on is a candidate.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>openai</category>
    </item>
    <item>
      <title>Dedicated Engineering Team vs Specialist Contractor for an AI Integration</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Wed, 28 Oct 2026 15:04:44 +0000</pubDate>
      <link>https://dev.to/ericthompson21/dedicated-engineering-team-vs-specialist-contractor-for-an-ai-integration-30k2</link>
      <guid>https://dev.to/ericthompson21/dedicated-engineering-team-vs-specialist-contractor-for-an-ai-integration-30k2</guid>
      <description>&lt;p&gt;hire a specialist contractor when your own engineers can do the integration work and you need one scarce skill, such as retrieval design or evaluation, for a few weeks. Choose a dedicated engineering team when you lack integration capacity, when the work runs past about three months, or when the AI feature becomes something you must keep improving. On price, one senior freelance AI specialist at $165–210 an hour costs about the same per week as a three-person offshore pod in India: about 6,600–8,400 versus $6,330 before fees and overhead. So the contractor route only saves money when one person is genuinely enough. Our scenarios show a 6-week feature costing about 42,000–53,000 with one contractor or 46,000–60,000 with a three-person pod. A 12-month capability costs 333,000–423,000 for one contractor, versus $365,000 for a three-person pod in India. All figures are illustrative estimates from stated assumptions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the difference, and what does an AI integration involve?
&lt;/h2&gt;

&lt;p&gt;The two options differ less in hourly price than in who owns delivery, continuity and the work around the AI model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two options
&lt;/h2&gt;

&lt;p&gt;Specialist contractor. An independent expert, usually hired directly or through a freelance platform, paid by the hour or the milestone. You direct the work, supply the surrounding engineering and own project risk. Best at deep, narrow problems: retrieval design, prompt and agent architecture, evaluation, model selection.&lt;br&gt;
Dedicated engineering team. A vendor-employed group, typically a lead plus engineers and QA, that works only on your product. The vendor handles hiring, replacement and day-to-day delivery; you set priorities. Best when the integration touches many parts of your product, or when the work continues after launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an AI integration actually involves
&lt;/h2&gt;

&lt;p&gt;The model call is the small part. A typical integration also needs:&lt;br&gt;
Data work: finding, cleaning, permissioning and connecting the data the model will use.&lt;br&gt;
Application work: APIs, UI changes, authentication, logging and error handling inside your existing product.&lt;br&gt;
AI-specific work: retrieval, prompts or agent logic, model choice, and guardrails.&lt;br&gt;
Evaluation: a test set and measurements that show whether the output is good enough, rerun on every change.&lt;br&gt;
Operations: monitoring quality, cost and latency after launch, and updating as models change.&lt;br&gt;
A specialist contractor usually covers item 3 and part of 4. Items 1, 2 and 5 still need engineers. That gap is where most of the cost difference in the scenarios below comes from. It also matches what MIT NANDA's preliminary 2025 research found: most enterprise AI tools that fail do so because of brittle workflows and poor fit with daily operations, not model quality (MIT NANDA abstract).&lt;/p&gt;

&lt;h2&gt;
  
  
  What do AI contractors and dedicated teams cost in 2026?
&lt;/h2&gt;

&lt;p&gt;Freelance AI specialists charge roughly two to five times the hourly rate of offshore team engineers, so rate comparisons only make sense per unit of capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Freelance AI specialists
&lt;/h2&gt;

&lt;p&gt;US freelance LLM developers: $125–175/h mid-level, $175–250/h senior, $250–350/h lead, with a reported senior median of $210/h (Second Talent, 2026).&lt;br&gt;
Freelance AI tiers, global: $130–200/h for retrieval (RAG) or fine-tuning engineers, $180–300/h for AI agent developers, $250–500/h for PhD or strategic consultants (Index.dev, 2026).&lt;br&gt;
Platform fees: Upwork is reported to charge clients a 5% fee; agencies in Eastern Europe and Latin America add 30–50% over a developer's take-home pay (Index.dev).&lt;br&gt;
Both sources are hiring platforms, and their published ranges vary. Treat them as indicative and get quotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dedicated teams
&lt;/h2&gt;

&lt;p&gt;India: $28–45/h mid-level, $45–70/h senior.&lt;br&gt;
Eastern Europe: $40–60/h mid-level, $60–90/h senior.&lt;br&gt;
Latin America: $45–65/h mid-level, $60–85/h senior.&lt;br&gt;
AI specialists within teams: a 20–40% premium over generalist rates.&lt;br&gt;
Overhead: coordination, QA and rework add 15–25% to the labour line.&lt;br&gt;
Source: Kanerika's 2026 synthesis of the Accelerance 2026 Rates &amp;amp; Trends Guide.&lt;br&gt;
In-house, for reference&lt;br&gt;
The US median software developer wage was $135,980 in May 2025, about $65 an hour before benefits and overhead (BLS). Specialist AI engineers earn more, and hiring takes months, so in-house rarely fits a single integration project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The comparison that matters
&lt;/h2&gt;

&lt;p&gt;At our reference rates, a three-person India pod costs $6,330 a week. That buys about 38 hours of a $165/h contractor. In other words: one week of one specialist contractor costs about the same as one week of a three-person offshore team. The question is whether you need one expert or three people's worth of delivery.&lt;br&gt;
Cost model: three AI integrations priced both ways&lt;br&gt;
The contractor is cheaper only when one person can do the job and your own team covers the rest; as scope and duration grow, the dedicated team delivers more capacity per dollar. All figures below are illustrative estimates.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we priced each option
&lt;/h2&gt;

&lt;p&gt;Contractor cost = hours × hourly rate × 1.05 (platform fee). Two rates: $165/h (mid-range freelance RAG engineer) and $210/h (US senior LLM freelancer median).&lt;br&gt;
Dedicated pod cost = weeks × weekly pod cost × 1.20 (overhead). The pod is 3.0 FTE: tech lead 0.5, AI engineer 1.0, full-stack 1.0, QA 0.5.&lt;br&gt;
Weekly pod cost, India: (20 h × $57.50) + (40 h × $57.50 × 1.30) + (40 h × $36.50) + (20 h × $36.50) = $1,150 + $2,990 + $1,460 + $730 = $6,330.&lt;br&gt;
Weekly pod cost, Eastern Europe: (20 × $75) + (40 × $75 × 1.30) + (40 × $50) + (20 × $50) = $1,500 + $3,900 + $2,000 + $1,000 = $8,400.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario A — a bounded AI feature (6 weeks)
&lt;/h2&gt;

&lt;p&gt;Example: add document summarisation or ticket classification to an existing product with a strong in-house team.&lt;br&gt;
Contractor, 240 hours: $41,580 at $165/h; $52,920 at $210/h.&lt;br&gt;
India pod: 6 × $6,330 × 1.20 = $45,576.&lt;br&gt;
Eastern Europe pod: 6 × $8,400 × 1.20 = $60,480.&lt;br&gt;
Verdict: contractor, if your engineers can absorb the application and QA work. The pod costs a similar amount but brings capacity you may not need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario B — a retrieval integration (12 weeks)
&lt;/h2&gt;

&lt;p&gt;Example: an assistant that answers from your knowledge base, with a data pipeline, permissions and an evaluation set.&lt;br&gt;
Contractor route, two freelancers: AI specialist 480 h × $165 = $79,200, plus a full-stack freelancer 480 h × $55 (midpoint of Index.dev's $40–70 Eastern Europe range) = $26,400. Total $105,600; with 5% fee, $110,880. QA and project management still fall on you.&lt;br&gt;
India pod: 12 × $6,330 × 1.20 = $91,152, including QA and a lead.&lt;br&gt;
Eastern Europe pod: 12 × $8,400 × 1.20 = $120,960.&lt;br&gt;
Verdict: dedicated team, unless you already have spare engineers and a project manager. Assembling contractors costs about the same and leaves coordination with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario C — ongoing AI capability (12 months)
&lt;/h2&gt;

&lt;p&gt;Example: an AI feature set that keeps expanding: new workflows, agent steps, evaluation runs, model upgrades.&lt;br&gt;
One contractor, 1,920 hours: $332,640 at $165/h; $423,360 at $210/h.&lt;br&gt;
India pod: 48 × $6,330 × 1.20 = $364,608, for three people.&lt;br&gt;
Eastern Europe pod: 48 × $8,400 × 1.20 = $483,840, for three people.&lt;br&gt;
Verdict: dedicated team. For about the cost of one senior contractor you get three times the capacity and continuity if someone leaves. One contractor for a full year also raises classification and key-person risks, covered next.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the scenarios show
&lt;/h2&gt;

&lt;p&gt;The cheapest option flips with scope: contractor for narrow, short work; team once the work spans data, application and operations.&lt;br&gt;
Duration matters more than rate. Over 12 months, small weekly differences add up, and the value of continuity grows.&lt;br&gt;
Your own spare capacity is the swing factor. If your engineers are already fully booked, the contractor route has a hidden cost: their time.&lt;br&gt;
Risks and hidden costs that change the answer&lt;br&gt;
The biggest costs of either option rarely show up on the rate card; they show up when someone leaves, when knowledge has to be handed over, or when the work outgrows the original plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risks that weigh more on the contractor route
&lt;/h2&gt;

&lt;p&gt;Key-person dependency. One person holds the retrieval design, prompts and evaluation logic. If they take another engagement, progress stops and a replacement has to relearn the system.&lt;br&gt;
Knowledge transfer. AI integrations accumulate unwritten decisions: why a chunking strategy was chosen, which test cases matter. Without a written handover, you pay to rediscover them.&lt;br&gt;
Coordination load. You become the project manager. Your engineers' time spent integrating, reviewing and testing is a real cost, even if it never appears on an invoice.&lt;br&gt;
Worker classification. In the US, the IRS assesses whether someone is a contractor or employee across behavioural control, financial control and the relationship between the parties. Misclassification can lead to back taxes, fines and interest (Deel summary of the IRS test). A full-time, open-ended, closely directed contractor raises that risk. This is general information, not legal advice; check with counsel for your jurisdiction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risks that weigh more on the dedicated-team route
&lt;/h2&gt;

&lt;p&gt;Ramp-up time. A team needs time to learn your codebase and domain. Expect slower output in the first weeks.&lt;br&gt;
Paying for capacity you do not use. If the work is genuinely small, a team adds cost without adding value.&lt;br&gt;
Seniority dilution. A vendor may staff the AI role with someone less experienced than promised. Name the roles and minimum experience in the contract.&lt;br&gt;
Coordination overhead. Index.dev estimates distributed teams lose 10–15% of productive time to time-zone coordination (Index.dev, 2026). Overlap matters more for AI work, where outputs need frequent review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risks common to both
&lt;/h2&gt;

&lt;p&gt;Data and IP. Both need written IP assignment, limits on using your data, and access controls on production data.&lt;br&gt;
Model and price changes. Model releases can change the best design mid-project. Agree up front how such changes are scoped and charged.&lt;br&gt;
Converting a contractor into a hire later. Employing someone abroad through an Employer of Record adds 15–25% on top of base pay, per Index.dev. Factor that in if you expect to keep a contractor long term.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to decide: a five-question framework
&lt;/h2&gt;

&lt;p&gt;Answer five questions; if three or more point the same way, that is your default.&lt;br&gt;
Do your engineers have spare capacity for data, application and testing work? Yes points to a contractor; no points to a team.&lt;br&gt;
Will the work last more than about three months? No points to a contractor; yes points to a team.&lt;br&gt;
Is the gap one specific skill, or broad delivery capacity? One skill points to a contractor; broad capacity points to a team.&lt;br&gt;
Will the AI feature need ongoing improvement after launch? No points to a contractor; yes points to a team.&lt;br&gt;
Can you manage the project day to day? Yes points to a contractor; no points to a team.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hybrid option
&lt;/h2&gt;

&lt;p&gt;A practical middle path combines both: a senior specialist contractor for two to four weeks to set the architecture, evaluation approach and model choice, followed by a dedicated team that builds, integrates and operates it. The specialist can stay on for a few hours a week as a reviewer. This pairs scarce expertise with continuity, and it limits the contractor's hours to where they add the most value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contract terms to insist on
&lt;/h2&gt;

&lt;p&gt;For a contractor: a defined deliverable or milestone, written handover documentation (design decisions, prompts, evaluation set), IP assignment on payment, and a notice period.&lt;br&gt;
For a dedicated team: named roles and minimum seniority, a replacement guarantee with handover time, a monthly scaling clause, retention data, and IP assignment.&lt;br&gt;
For both: no training on your data, access controls on production systems, and a clear process for pricing model or provider changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where CodingCops fits
&lt;/h2&gt;

&lt;p&gt;Disclosure: this article is published by CodingCops, and the author is affiliated with the company.&lt;br&gt;
CodingCops describes itself as a full-cycle technology partner that helps businesses design, build, scale and maintain software systems, working with startups, growing companies and enterprises across custom software development, AI and machine learning, cloud and DevOps, and dedicated engineering teams. That covers the dedicated-team route described here. This article includes no CodingCops pricing or client results. If you are comparing options, ask contractors and vendors, including us, to price the same scenario from this guide so the quotes are comparable.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Is a specialist contractor cheaper than a dedicated team for AI work?
&lt;/h2&gt;

&lt;p&gt;Per hour, no: freelance AI specialists charge about $130–250 an hour, versus roughly $37–75 for offshore team engineers. Per project, a contractor can be cheaper for short, narrow work when your own engineers handle the rest. In our 6-week scenario, one contractor costs 41,580–52,920 versus $45,576 for a three-person India pod.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does a freelance AI engineer cost in 2026?
&lt;/h2&gt;

&lt;p&gt;Published ranges put US freelance LLM developers at $175–250 an hour for senior work, and global freelance retrieval or fine-tuning engineers at $130–200. AI agent developers are quoted at $180–300. Sources are hiring platforms, so get quotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does a dedicated AI engineering team cost?
&lt;/h2&gt;

&lt;p&gt;Our three-person pod costs about $6,330 a week in India and $8,400 in Eastern Europe before overhead. Kanerika puts a five-engineer team at 24,000–44,000 a month depending on region.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should I switch from a contractor to a team?
&lt;/h2&gt;

&lt;p&gt;When the work passes about three months, when your engineers become the bottleneck, or when the AI feature needs continuous improvement after launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can I use both?
&lt;/h2&gt;

&lt;p&gt;Yes. A short specialist engagement to set architecture and evaluation, followed by a dedicated team to build and run it, combines expertise with continuity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the biggest risk with a single AI contractor?
&lt;/h2&gt;

&lt;p&gt;Key-person dependency. If the contractor leaves, the knowledge behind the retrieval design, prompts and evaluation goes with them unless it is documented.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>freelance</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>When Is a Managed LLM Gateway Worth Its Cost?</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Tue, 27 Oct 2026 14:53:45 +0000</pubDate>
      <link>https://dev.to/ericthompson21/when-is-a-managed-llm-gateway-worth-its-cost-5959</link>
      <guid>https://dev.to/ericthompson21/when-is-a-managed-llm-gateway-worth-its-cost-5959</guid>
      <description>&lt;p&gt;A managed LLM gateway is worth its cost in two situations: almost always when it is priced per log or per seat, and only below a spend threshold when it takes a percentage of your model spend.&lt;br&gt;
Log-priced gateways are cheap relative to engineering time. Portkey's Production plan, for example, works out to about $130 a month at one million logged requests. That is less than two hours of a fully loaded US engineer.&lt;br&gt;
Percentage-fee gateways scale with your bill. At a 5.5% platform fee, a managed gateway costs more than self-hosting once your monthly model spend passes roughly $35,000 if self-hosting would take 20 hours a month of US engineering time, or roughly $13,000 if that work is done at offshore rates (illustrative; infrastructure excluded).&lt;br&gt;
Above those lines, self-hosting an open-source gateway, using your own provider keys, or negotiating an enterprise contract usually costs less. The rest of this article shows the numbers, so you can rerun them with your own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disclosure, scope and freshness
&lt;/h2&gt;

&lt;p&gt;Affiliation: Published by CodingCops, which builds AI systems and supplies engineering teams. [Editor to confirm before publishing: CodingCops has no reseller or paid relationship with any gateway named here.]&lt;br&gt;
Scope: US dollars; US-based buyer; vendor prices as listed on each vendor's pricing page on October 27, 2026; US engineering cost from BLS May 2025 wages and June 2026 benefit data. Gateway pricing changes often, so this guide is reviewed quarterly.&lt;br&gt;
Labels: Sourced figures come from the cited page. Illustrative figures are this article's calculations, with assumptions stated. Model token prices are excluded throughout: they are the same whichever gateway you use, unless a gateway marks them up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an LLM gateway does, and three ways to get one
&lt;/h2&gt;

&lt;p&gt;An LLM gateway is a proxy between your application and model providers. It gives you one API across providers, plus the controls you would otherwise build yourself: key management, retries and fallbacks, routing and load balancing, caching, rate limits and budgets, request logging, cost attribution, and guardrails.&lt;/p&gt;

&lt;h2&gt;
  
  
  You can get one in three ways:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Managed SaaS. The vendor runs it. You pay a subscription, a per-log fee, or a percentage of model spend.&lt;/li&gt;
&lt;li&gt;Self-hosted open source. You run a free gateway (LiteLLM and Portkey both publish open-source versions) on your own infrastructure. No licence fee; you pay in infrastructure and engineering time.&lt;/li&gt;
&lt;li&gt;Enterprise licence. A vendor's enterprise edition, often deployable in your own cloud or VPC, with SSO, audit logs and support. Priced by quote.
The cost question is really a question about which bill grows fastest as you scale: a vendor fee, your cloud bill, or your engineers' time.
Managed gateway pricing in 2026: the two pricing families
Managed gateways price in one of two ways, and which one you face matters more than the headline number: a percentage of model spend, which grows with your bill, or a fee per log, seat or plan, which grows with request volume and usually stays small.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Percentage-of-spend pricing (sourced)
&lt;/h2&gt;

&lt;p&gt;• OpenRouter: 5.5% platform fee on the Standard pay-as-you-go plan and 8% on Business; enterprise fee discounts by negotiation. With your own provider keys (BYOK), the first $25,000 of list-price inference a month carries no fee, then 5% (OpenRouter pricing).&lt;br&gt;
• Cloudflare AI Gateway, Unified Billing: a 5% fee on credit purchases, with provider inference passed through at the provider's per-token rate. Using your own provider keys avoids this fee; core gateway features (analytics, caching, rate limiting) are free (Cloudflare AI Gateway pricing).&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan and log-based pricing (sourced)
&lt;/h2&gt;

&lt;p&gt;• Portkey: Developer plan free (10,000 recorded logs a month; the vendor says it is not suitable for production). Production plan $49 a month with 100,000 logs, then $9 per additional 100,000. Enterprise by quote, with SSO, VPC hosting and compliance options (Portkey pricing).&lt;br&gt;
• Helicone: Hobby free (10,000 requests, 7-day retention); Pro $79 a month; Team $799 a month; Enterprise custom. Usage-based charges apply beyond included volumes, but per-unit rates are not published on the pricing page (Helicone pricing).&lt;br&gt;
• Cloudflare logs: older gateways include 100,000 stored logs on Workers Free and 10 million per gateway on Workers Paid; gateways created on or after September 24, 2026 follow Workers Logs pricing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-hosted and enterprise licences (sourced)
&lt;/h2&gt;

&lt;p&gt;• LiteLLM: open-source edition free with no licence fee, including virtual keys, budgets, rate limits, fallbacks and logging. Enterprise is an annual custom quote based on request capacity, deployment architecture and support, and the vendor states it is never priced per token. SSO, audit logs, RBAC and air-gapped deployment are enterprise-only (LiteLLM pricing).&lt;br&gt;
Two things to check on any plan: whether hitting a log limit stops logging or stops traffic (Portkey says requests keep flowing), and whether the features you need, usually SSO, audit logs and data residency, sit only in the enterprise tier.&lt;/p&gt;

&lt;h2&gt;
  
  
  What self-hosting really costs
&lt;/h2&gt;

&lt;p&gt;The licence for an open-source gateway is free; the real cost is the engineer who keeps it running, and that cost depends heavily on where that engineer sits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering rates used (sourced inputs)
&lt;/h2&gt;

&lt;p&gt;• US in-house: $95.44 an hour fully loaded. BLS puts the median software developer wage at $135,980 (May 2025); wages were 68.5% of total employer cost for full-time private-industry workers in June 2026, so $135,980 ÷ 2,080 hours ÷ 0.685 (BLS OOH, BLS ECEC).&lt;br&gt;
• Nearshore (Latin America): $67.50 an hour, the midpoint of the $60–$75 senior band in Accelerance's 2026 survey (via BEON.tech).&lt;br&gt;
• Offshore (Asia): $36 an hour, the midpoint of the $31–$41 senior band in the same survey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the hours go
&lt;/h2&gt;

&lt;p&gt;• Setup: deployment, secrets management, provider configuration, high availability, log storage, dashboards, access control.&lt;br&gt;
• Upkeep: version upgrades, new providers and models, incident response, cost-map updates when provider prices change, log retention, security patching.&lt;br&gt;
• Compliance work: audit evidence, access reviews, data-residency controls; heavier in regulated industries.&lt;br&gt;
This article assumes 20 hours a month of upkeep for one production gateway and 80 hours a month (half an engineer) for an enterprise deployment. These are illustrative; replace them with your own estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monthly upkeep cost (illustrative)
&lt;/h2&gt;

&lt;p&gt;• 20 hours a month: US $1,909 · nearshore $1,350 · offshore $720&lt;br&gt;
• 80 hours a month: US $7,635 · nearshore $5,400 · offshore $2,880&lt;br&gt;
Infrastructure (compute, database, log storage, network) comes on top. It is left as a variable here because it depends on your cloud, region, redundancy and log volume; price it from your own cloud bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  The break-even model
&lt;/h2&gt;

&lt;p&gt;A percentage-fee gateway is cheaper than self-hosting only while its fee is below what self-hosting would cost you each month:&lt;br&gt;
f \times S &amp;lt; I + H \times r&lt;br&gt;
where f is the gateway fee rate, S is monthly model spend through the gateway, I is monthly self-hosting infrastructure, H is monthly upkeep hours and r is the loaded hourly rate. Solving for the spend at which the two are equal:&lt;br&gt;
S^{*} = \frac{I + H \times r}{f}&lt;br&gt;
Break-even monthly spend at 20 upkeep hours, infrastructure excluded (illustrative)&lt;br&gt;
• 5.5% fee (OpenRouter Standard): US engineer $34,705 · nearshore $24,545 · offshore $13,091&lt;br&gt;
• 5% fee (Cloudflare Unified Billing; OpenRouter BYOK above its free allowance): US $38,176 · nearshore $27,000 · offshore $14,400&lt;br&gt;
Example: with a US engineer, $1,909 ÷ 0.055 = $34,705. Adding infrastructure raises every threshold. Each $500 a month of infrastructure moves the 5.5% break-even up by about $9,100 of spend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two adjustments specific to vendors:
&lt;/h2&gt;

&lt;p&gt;• OpenRouter BYOK charges nothing on the first $25,000 a month of list-price inference, so its fee is (S − 25,000) × 5%. Below $25,000 a month, the fee is zero and self-hosting cannot win on fees alone.&lt;br&gt;
• Log-priced gateways don't fit the formula because their cost doesn't track spend. Portkey Production is $49 + $9 per extra 100,000 logs: about $130 a month at 1 million logs and $310 at 3 million. Against a 20-hour upkeep budget, self-hosting does not beat that on cost at any of the three engineering rates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Budget scenarios: pilot, production, enterprise
&lt;/h2&gt;

&lt;p&gt;The right gateway changes as an AI product moves from pilot to production: managed is the clear winner in a pilot, log-priced managed or BYOK wins in production, and at enterprise scale the real choice is an enterprise quote versus your own team. All figures are monthly and illustrative; model token costs excluded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 1 — Pilot: $2,000 model spend, 50,000 requests
&lt;/h2&gt;

&lt;p&gt;• OpenRouter with credits (5.5%): $110&lt;br&gt;
• OpenRouter BYOK: $0 (under the $25,000 free allowance)&lt;br&gt;
• Cloudflare with your own keys: $0 for core features; $100 if using Unified Billing&lt;br&gt;
• Portkey Production: $49 (within 100,000 logs)&lt;br&gt;
• Helicone Pro: $79 base&lt;br&gt;
• Self-hosted, 20 hours upkeep: $720–$1,909 plus infrastructure&lt;br&gt;
Read: Self-hosting costs roughly 7 to 40 times more than the paid managed options here. In a pilot, engineering hours belong on the product, not the plumbing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 2 — Production: $40,000 model spend, 1 million requests
&lt;/h2&gt;

&lt;p&gt;• OpenRouter with credits (5.5%): $2,200&lt;br&gt;
• OpenRouter BYOK: $750 ((40,000 − 25,000) × 5%)&lt;br&gt;
• Cloudflare Unified Billing (5%): $2,000; own keys: core features free&lt;br&gt;
• Portkey Production: $130&lt;br&gt;
• Self-hosted, 20 hours upkeep: US $1,909 · nearshore $1,350 · offshore $720, each plus infrastructure&lt;br&gt;
Read: This is where percentage fees start to hurt: $2,200 a month of credits fees is more than a US engineer's upkeep time. Switching to your own keys, or to a log-priced gateway, keeps managed cheaper than self-hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 3 — Enterprise: $250,000 model spend, 10 million requests, SSO, audit logs and VPC required
&lt;/h2&gt;

&lt;p&gt;• OpenRouter with credits (5.5%): $13,750&lt;br&gt;
• OpenRouter BYOK: $11,250&lt;br&gt;
• Cloudflare Unified Billing (5%): $12,500&lt;br&gt;
• Portkey or LiteLLM enterprise: custom quote (Portkey's Production plan stops at 3 million requests; SSO and VPC sit in enterprise tiers)&lt;br&gt;
• Self-hosted open source, 80 hours upkeep: US $7,635 · nearshore $5,400 · offshore $2,880, each plus infrastructure, plus the cost of building whatever enterprise features the open-source edition lacks&lt;br&gt;
Read: Percentage fees at this scale cost $135,000–$165,000 a year. That approaches the loaded cost of a full-time US engineer (about $198,500 a year) and exceeds a full-time nearshore senior (about $129,600 at 1,920 hours), so the decision becomes an enterprise licence quote versus self-hosting with your own (or a partner's) engineers. Compare the quote to 80 hours a month plus infrastructure plus the build cost of SSO, audit and compliance controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Savings claims to test before you count them
&lt;/h2&gt;

&lt;p&gt;Gateways are often sold on the savings they create, not just their price. Those savings can be real, but they depend on your traffic, so measure them on your own workload before putting them in a business case.&lt;br&gt;
• Caching. Exact-match caching only saves money when identical requests repeat; semantic caching widens the match but can return a stale or wrong answer. Measure your hit rate in a trial before assuming any saving.&lt;br&gt;
• Model routing. Sending simple requests to cheaper models can cut spend, but the saving depends on how much of your traffic can tolerate a smaller model. Validate with your own evaluation set.&lt;br&gt;
• Fallbacks and retries. These protect uptime more than they cut cost; retries can increase spend if they re-send long prompts.&lt;br&gt;
• Budgets and rate limits. Their value is avoiding runaway bills from a bug or abuse. They prevent losses rather than reduce normal spend.&lt;br&gt;
• Cost visibility. Per-team and per-feature attribution is often the most useful output for a CFO, and it is available in both managed and open-source gateways.&lt;br&gt;
None of these savings are exclusive to managed gateways: open-source gateways offer caching, routing, budgets and fallbacks too. What you pay a managed vendor for is time and operational risk, not the features themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision framework: managed, self-hosted or enterprise
&lt;/h2&gt;

&lt;p&gt;Pick the option whose cost grows slowest at the scale you expect in 12 months, not the one that is cheapest today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose a managed gateway when:
&lt;/h2&gt;

&lt;p&gt;• You are in a pilot or early production and model spend is below the break-even for your engineering rate.&lt;br&gt;
• The gateway is priced per log or plan, not per dollar of spend.&lt;br&gt;
• You can bring your own provider keys, so fees stay low or zero.&lt;br&gt;
• You have no engineer with time to own another piece of infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose self-hosted open source when:
&lt;/h2&gt;

&lt;p&gt;• Monthly spend is well above break-even and you are paying a percentage fee.&lt;br&gt;
• Data must stay inside your own cloud, and the open-source edition covers your controls.&lt;br&gt;
• You already run platform infrastructure and can absorb upkeep inside an existing team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose an enterprise licence when:
&lt;/h2&gt;

&lt;p&gt;• You need SSO, audit logs, RBAC, air-gapped or VPC deployment, and vendor support, and building them yourself would cost more than the quote.&lt;br&gt;
• Compliance requires a vendor contract, SLAs or a BAA.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who should run a self-hosted gateway
&lt;/h2&gt;

&lt;p&gt;If you self-host, the engineering rate is the biggest variable in the break-even, so staffing matters:&lt;br&gt;
• In-house US platform team: highest cost per hour but deepest context; best when the gateway sits next to other internal platform services.&lt;br&gt;
• Nearshore dedicated engineers: about 30% below the US loaded rate on these benchmarks, with most of the US workday in overlap for incidents.&lt;br&gt;
• Offshore dedicated engineers: the lowest rate, which lowers break-even the most, but plan for limited overlap during US-hours incidents.&lt;br&gt;
CodingCops is one option for that last mile. It describes itself as an AI-native technology and engineering partner whose work spans AI integration, custom LLM applications, cloud and DevOps, and dedicated engineering teams (CodingCops company profile, G2). Evaluate any partner, CodingCops included, against the break-even numbers above.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How much does an LLM gateway cost per month?
&lt;/h2&gt;

&lt;p&gt;From $0 to a few hundred dollars for most small and mid-size workloads on log- or plan-priced gateways (for example, Portkey Production is $49 a month for 100,000 logs). Percentage-fee gateways cost 5–8% of model spend unless you bring your own keys. Enterprise editions are quoted individually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is a self-hosted LLM gateway free?
&lt;/h2&gt;

&lt;p&gt;The licence can be; the operation is not. At 20 hours a month of upkeep, the labour alone runs about $720 (offshore) to $1,909 (US in-house) a month, before infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  At what spend should I stop paying a percentage fee?
&lt;/h2&gt;

&lt;p&gt;At a 5.5% fee and 20 upkeep hours a month, roughly $13,000 of monthly model spend with offshore engineering, $25,000 with nearshore and $35,000 with US in-house, before infrastructure. Use the formula above with your own numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does a gateway mark up model prices?
&lt;/h2&gt;

&lt;p&gt;Check each vendor. Cloudflare states provider inference is passed through at the provider's per-token rate and charges 5% on credits. OpenRouter charges a platform fee; its pricing page did not show its markup FAQ answer when checked, so confirm with the vendor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do I need a gateway for an AI pilot?
&lt;/h2&gt;

&lt;p&gt;Not necessarily, but a free or low-cost managed tier gives you logging and cost tracking from day one, which makes the production budget easier to estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  What features usually force an enterprise plan?
&lt;/h2&gt;

&lt;p&gt;SSO, audit logs, role-based access, VPC or air-gapped deployment, data-retention controls and compliance agreements. On the pricing pages reviewed, these sit in enterprise tiers.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>backend</category>
      <category>llm</category>
    </item>
    <item>
      <title>Build vs Managed Vector Database: A Total-Cost Framework</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Wed, 21 Oct 2026 15:08:05 +0000</pubDate>
      <link>https://dev.to/ericthompson21/build-vs-managed-vector-database-a-total-cost-framework-2do0</link>
      <guid>https://dev.to/ericthompson21/build-vs-managed-vector-database-a-total-cost-framework-2do0</guid>
      <description>&lt;p&gt;For most teams under roughly 200 million vectors, a managed vector database costs less in total than self-hosting, because people cost more than servers. In our model, a 20M-vector production workload runs about $21K–$27K a year on Weaviate Cloud or Pinecone, including staff time to manage the vendor. Self-hosting the same workload costs $58K–$114K in year one, depending on whether the operators are offshore, nearshore or US-based. The cloud bill for self-hosting is only about $13.7K of that.&lt;/p&gt;

&lt;p&gt;Self-hosting starts to win at large scale when your query pattern is expensive on usage-based pricing, when data residency rules out SaaS, or when a platform team already runs stateful clusters and can absorb the work. The single biggest swing factor is not build vs buy. It is how your data is partitioned, which can move a managed bill by more than 100x.&lt;/p&gt;

&lt;h2&gt;
  
  
  Year-one total cost at a glance
&lt;/h2&gt;

&lt;p&gt;P*&lt;em&gt;ilot (1M vectors, 0.5M queries a month)&lt;/em&gt;*. Managed costs about $10.2K on Weaviate Cloud and $10.3K on Pinecone. Self-hosting costs $26.8K with offshore operators, $36.9K nearshore and $52.0K with a US in-house team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Growth (20M vectors, 10M queries a month).&lt;/strong&gt; Managed costs about $21.4K on Weaviate Cloud and $26.9K on Pinecone with partitioned data, but $300.9K on Pinecone if every query scans one namespace. Self-hosting costs $58.3K offshore, $80.7K nearshore and $114.1K in-house.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scale (200M vectors, 100M queries a month).&lt;/strong&gt; Managed costs from about $55.1K on Weaviate Cloud (lowest published rates; a quote is needed) and $90.3K–$152.1K on Pinecone with partitioned data. Self-hosting costs $168.1K offshore, $214.9K nearshore and $284.9K in-house.&lt;/p&gt;

&lt;p&gt;All figures are modeled estimates built from sourced unit prices and the documented assumptions in Part 1. Managed totals include vendor-management staff time; self-host totals include cloud infrastructure, initial build and ongoing operations. Embedding, LLM and application costs are excluded because they are the same either way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "total cost" means for a vector database
&lt;/h2&gt;

&lt;p&gt;A vector database bill has five lines, and only two of them show up on an invoice.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Platform or infrastructure: the managed subscription, or EC2/VM compute, block storage and snapshots.&lt;/li&gt;
&lt;li&gt;Usage: read units, write units, stored dimensions or egress on managed plans; cross-AZ traffic when self-hosting.&lt;/li&gt;
&lt;li&gt;Initial build: cluster design, infrastructure-as-code, backups, monitoring, load testing and recall evaluation.&lt;/li&gt;
&lt;li&gt;Ongoing operations: upgrades, re-indexing, capacity planning, incident response, security patching.&lt;/li&gt;
&lt;li&gt;Vendor management: cost monitoring, quota tuning, support tickets and contract reviews on managed plans.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Self-hosting shrinks lines 1–2 and grows lines 3–4. Managed services do the opposite. The decision comes down to which side grows faster for your workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managed vector database pricing (October 2026)
&lt;/h2&gt;

&lt;p&gt;• Pinecone Standard: usage-based on reads, writes and storage. $16–18 per 1M read units, $4–4.50 per 1M write units and $0.33/GB-month, with a $50/month minimum. No uptime SLA is listed.&lt;/p&gt;

&lt;p&gt;• Pinecone Enterprise: the same model at $24–27 per 1M read units and $6–6.75 per 1M write units, with a $500/month minimum and a 99.95% SLA.&lt;/p&gt;

&lt;p&gt;• Weaviate Cloud Flex: priced on stored dimensions and storage, from $0.00465 per 1M dimensions, $0.12/GiB storage and $0.03036/GiB backup. The minimum is $45/month and the SLA is 99.5%.&lt;/p&gt;

&lt;p&gt;• Weaviate Cloud Premium: a prepaid contract from $400/month. Shared clusters start at $0.003875 per 1M dimensions and dedicated at $0.002718, with SLAs up to 99.95%.&lt;/p&gt;

&lt;p&gt;• Qdrant Cloud: billed on provisioned CPU, RAM and disk after a free tier. Rates appear only in its pricing calculator; Standard carries a 99.5% SLA and Premium higher.&lt;/p&gt;

&lt;p&gt;• Zilliz Cloud: compute units on dedicated plans or vCUs on serverless, after a free tier. Storage is $0.040/GB-month from January 2026 and internet egress starts at $0.09/GB.&lt;/p&gt;

&lt;p&gt;Two details matter more than headline rates. First, Pinecone charges reads by namespace size: each query costs 1 read unit per GB of the namespace searched, with a 0.25 RU minimum. Second, Weaviate prices on stored dimensions with no per-query fee in its published table, and its rates vary with index type, compression and region. Zilliz's own engineering blog shows the same workload pricing at about $7,000/month on dedicated and about $10,800 on serverless. The pricing model you pick can matter as much as the vendor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-hosted infrastructure cost
&lt;/h2&gt;

&lt;p&gt;Self-hosting Qdrant, Weaviate or Milvus is mostly a memory problem. Qdrant's capacity-planning guide gives a rough formula for keeping float32 vectors in RAM:&lt;/p&gt;

&lt;p&gt;\text{RAM} = \text{vectors} \times \text{dimensions} \times 4\ \text{bytes} \times 1.5&lt;/p&gt;

&lt;p&gt;Quantizing to int8 replaces the 4 bytes with 1 and keeps full-precision originals on disk for rescoring. That is the design we assume from 20M vectors up.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS us-east-1 rates used in the model:
&lt;/h2&gt;

&lt;p&gt;• r7g.xlarge (4 vCPU, 32 GiB): $0.2142/hour on demand, about $156/month, or $0.1552/hour on a 1-year Compute Savings Plan.&lt;/p&gt;

&lt;p&gt;• r7g.2xlarge (8 vCPU, 64 GiB): $0.4284/hour, about $313/month, or $0.3104/hour on the Savings Plan.&lt;/p&gt;

&lt;p&gt;• r7g.4xlarge (16 vCPU, 128 GiB): $0.8568/hour, about $625/month, or $0.6208/hour on the Savings Plan.&lt;/p&gt;

&lt;p&gt;• EBS gp3 block storage: $0.08/GB-month. EBS snapshots: $0.05/GB-month.&lt;/p&gt;

&lt;h2&gt;
  
  
  The people line: in-house vs nearshore vs offshore
&lt;/h2&gt;

&lt;p&gt;Engineering time is the largest cost of self-hosting at every scale we modeled. We price it three ways.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• US in-house hire:&lt;/strong&gt; $101.18/hour, or $194,257 a year per FTE. This is the BLS median software developer wage of $135,980 (May 2025, reported here) divided by 0.70, because wages are 70.0% of private-industry compensation per BLS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Nearshore senior engineer (Latin America):&lt;/strong&gt; $67.50/hour, or $129,600 a year per FTE. This is the midpoint of the $60–75/hour senior range in FullStack's 2026 report.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Offshore senior engineer (South Asia):&lt;/strong&gt; $45/hour, or $86,400 a year per FTE. This is the midpoint of the $40–50/hour India senior range in Full Scale's 2026 guide.&lt;/p&gt;

&lt;p&gt;The US figure is conservative for this work. SRE total compensation has a reported Levels.fyi median of about $200,200 before benefits, per KORE1's 2026 guide. Vendor rates for nearshore and offshore teams already include the vendor's overhead, so no benefits multiplier is applied to them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 1 — Pilot: 1M vectors, 500K queries/month, 1M upserts/month
&lt;/h2&gt;

&lt;p&gt;• Pinecone: reads in one namespace are 500K queries × 7.15 RU × $16/M = $57.20. Writes are 1M upserts × 7 WU × $4/M = $28.00, and storage is 7.15 GB × $0.33 = $2.36. That totals $87.56 a month, which falls under the $50 minimum once the data is split into 10 or more namespaces.&lt;/p&gt;

&lt;p&gt;• Weaviate Flex: 1,536M dimensions × $0.00465 = $7.14 plus under $1 of storage, so the $45 minimum applies.&lt;/p&gt;

&lt;p&gt;• Self-host infrastructure: three r7g.xlarge nodes at $156.37 each cost $469; the 8.6 GiB of vectors fits easily. Adding 150 GB of gp3 ($12) and snapshots ($0.36), then the 15% allowance, gives about $554 a month.&lt;/p&gt;

&lt;p&gt;• Self-host operations: 0.15 FTE costs $2,428 a month in-house, $1,620 nearshore or $1,080 offshore.&lt;/p&gt;

&lt;p&gt;• Initial build: 4 engineer-weeks cost $16,188 in-house, $10,800 nearshore or $7,200 offshore, once.&lt;/p&gt;

&lt;p&gt;At pilot scale the managed bill is close to its minimum. The self-hosted three-node cluster alone costs more than ten times the managed subscription before anyone touches it. Verdict: managed, without much debate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 2 — Growth: 20M vectors, 10M queries/month, 10M upserts/month
&lt;/h2&gt;

&lt;p&gt;• Pinecone reads: one 143 GB namespace costs 10M queries × 143 RU × $16/M = $22,880 a month. Split into 500 tenant namespaces, it costs 10M × 0.286 RU × $16/M = $45.76.&lt;/p&gt;

&lt;p&gt;• Pinecone writes, storage and support: 70M WU × $4/M = $280, 143 GB × $0.33 = $47.19, plus the $250 Pro support add-on. The total is $623 partitioned or $23,457 in a single namespace.&lt;/p&gt;

&lt;p&gt;• Weaviate Flex: 30,720M dimensions × $0.00465 = $142.85, plus 133.2 GiB × $0.12 = $15.98 storage and $4.04 backup, for about $163 a month.&lt;/p&gt;

&lt;p&gt;• Self-host infrastructure: three r7g.2xlarge nodes cost $938 ($680 on a 1-year Savings Plan). Int8 vectors take 42.9 GiB, or 85.8 GiB with two replicas, out of 192 GiB. Adding $48 of EBS and $7 of snapshots, then 15%, gives about $1,142 a month.&lt;/p&gt;

&lt;p&gt;• Self-host operations: 0.35 FTE costs $5,666 a month in-house, $3,780 nearshore or $2,520 offshore.&lt;/p&gt;

&lt;p&gt;• Initial build: 8 engineer-weeks cost $32,376 in-house, $21,600 nearshore or $14,400 offshore, once.&lt;/p&gt;

&lt;p&gt;Weaviate Flex is a shared cluster with a 99.5% SLA. A team that needs SSO, private networking or a higher SLA moves to Premium at $400/month or more. Even then, managed stays well under the self-host total. Verdict: managed, provided your data partitions cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 3 — Scale: 200M vectors, 100M queries/month, 50M upserts/month
&lt;/h2&gt;

&lt;p&gt;• Pinecone Enterprise reads: with 2,000 namespaces, 100M × 0.715 RU × $24/M = $1,716 a month. With 500 namespaces, 100M × 2.86 RU × $24/M = $6,864.&lt;/p&gt;

&lt;p&gt;• Pinecone writes and storage: 350M WU × $6/M = $2,100 and 1,430 GB × $0.33 = $471.90. The total is $4,288–$9,436 a month for partitioned data; a single 1.4 TB namespace is not viable on usage pricing.&lt;/p&gt;

&lt;p&gt;• Weaviate Premium (shared, lowest published rates): 307,200M dimensions × $0.003875 = $1,190, plus $133 storage and $28 backup, for about $1,352 a month. A quote is required.&lt;/p&gt;

&lt;p&gt;• Self-host infrastructure: eight r7g.4xlarge nodes cost $5,004 ($3,625 on a 1-year Savings Plan). Int8 vectors take 429 GiB, or 858 GiB with two replicas, out of 1,024 GiB. Adding $320 of EBS and $72 of snapshots, then 15%, gives about $6,204 a month.&lt;/p&gt;

&lt;p&gt;• Self-host operations: 0.75 FTE costs $12,141 a month in-house, $8,100 nearshore or $5,400 offshore.&lt;/p&gt;

&lt;p&gt;• Initial build: 16 engineer-weeks cost $64,752 in-house, $43,200 nearshore or $28,800 offshore, once.&lt;/p&gt;

&lt;p&gt;At this scale the answer depends on query shape. With fine-grained tenant partitions, managed stays cheaper. If queries must search large shared namespaces, an offshore-operated cluster ($139K/year steady state) undercuts Pinecone's 500-namespace case ($152K/year with vendor management). &lt;/p&gt;

&lt;p&gt;Weaviate's figure uses the lowest published rate and will rise with HNSW indexes, dedicated tenancy or specific regions. Verdict: get vendor quotes and run the break-even test below.&lt;/p&gt;

&lt;h2&gt;
  
  
  The read-unit trap: partitioning changes the bill 100x
&lt;/h2&gt;

&lt;p&gt;On Pinecone serverless, cost per query scales with the size of the namespace searched. The same 20M-vector, 10M-query workload costs:&lt;/p&gt;

&lt;p&gt;• One namespace of 143 GB: 143 read units per query, about $23,457 a month.&lt;/p&gt;

&lt;p&gt;• Ten namespaces of 14.3 GB: 14.3 read units per query, about $2,865 a month.&lt;/p&gt;

&lt;p&gt;• 500 namespaces of 0.29 GB: 0.286 read units per query, about $623 a month.&lt;/p&gt;

&lt;p&gt;Multi-tenant SaaS products fit this model well, since each customer's queries hit only their own namespace. A global semantic search across one large corpus does not. Check your query pattern before you compare vendors; it is the most consequential input in this framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Break-even: when self-hosting wins
&lt;/h2&gt;

&lt;p&gt;Self-hosting pays off when the managed bill exceeds the infrastructure cost plus the extra engineering time it takes to run the cluster:&lt;/p&gt;

&lt;p&gt;\text{Break-even managed bill per month} = \text{self-host infra per month} + \Delta\text{FTE} \times \text{monthly cost of 1 FTE}&lt;/p&gt;

&lt;p&gt;ΔFTE is self-host operations effort minus managed vendor-management effort. One FTE costs $16,188/month in-house in the US, $10,800 nearshore and $7,200 offshore at the rates above.&lt;/p&gt;

&lt;p&gt;• Growth (20M vectors): infrastructure of $1,142 plus 0.25 extra FTE puts the break-even at about $5,189 a month with a US team, or $2,942 with an offshore team.&lt;/p&gt;

&lt;p&gt;• Scale (200M vectors): infrastructure of $6,204 plus 0.55 extra FTE puts the break-even at about $15,107 a month with a US team, or $10,164 with an offshore team.&lt;/p&gt;

&lt;p&gt;If your managed quote sits above these lines for a steady workload, self-hosting deserves a serious look. A 1-year Savings Plan lowers both break-even points by roughly a quarter of the compute line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-cost reasons that override the math
&lt;/h2&gt;

&lt;p&gt;• Data residency or air-gapped requirements: self-host, or use bring-your-own-cloud options from Pinecone, Qdrant Hybrid Cloud or Zilliz BYOC.&lt;/p&gt;

&lt;p&gt;• Predictable spend: provisioned models (Qdrant Cloud, Zilliz dedicated, self-hosted) do not spike with query volume.&lt;/p&gt;

&lt;p&gt;• Latency control: self-hosting lets you co-locate the index with the application and tune HNSW and quantization directly.&lt;/p&gt;

&lt;p&gt;• Team focus: every hour spent on re-indexing is an hour not spent on retrieval quality, which usually matters more to the product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team composition and timelines for a self-hosted build
&lt;/h2&gt;

&lt;p&gt;• Pilot (1M vectors): a part-time senior platform or SRE engineer leads, with part-time ML help for recall testing and a security checklist. Modeled effort is 4 engineer-weeks.&lt;/p&gt;

&lt;p&gt;• Growth (20M vectors): a senior platform engineer leads, one backend engineer handles ingestion and migration, ML help is part-time, and security gets a review. Modeled effort is 8 engineer-weeks.&lt;/p&gt;

&lt;p&gt;• Scale (200M vectors): a senior platform lead plus an on-call rotation, one or two backend engineers, a dedicated ML or data engineer for quantization tuning, and a formal security review. Modeled effort is 16 engineer-weeks.&lt;/p&gt;

&lt;p&gt;The build effort figures are illustrative estimates, not benchmarks. A 16-week Scale build spread across two or three engineers typically fits a quarter, and the on-call rotation needs at least two trained people to be sustainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engagement models compared
&lt;/h2&gt;

&lt;p&gt;• In-house hire: best for long-lived platform teams already running stateful systems. The risk is hiring time and dependence on one person.&lt;/p&gt;

&lt;p&gt;• Dedicated nearshore team: best for real-time collaboration with US teams, with 4–6 hours of overlap per Full Scale. The trade-off is a higher rate than offshore.&lt;/p&gt;

&lt;p&gt;• Dedicated offshore team: best for well-specified builds and follow-the-sun operations. The risk is handoff discipline across time zones.&lt;/p&gt;

&lt;p&gt;• Fixed-price migration project: best for one-off moves between vendors or to self-hosting. The risk is scope creep once production traffic is live.&lt;/p&gt;

&lt;p&gt;• Managed service plus an advisory retainer: best for teams that want managed infrastructure but need help with schema, partitioning and cost tuning. Its value depends on clear goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  A five-step decision framework
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Model your query shape first. Write down vectors, dimensions, queries per month, upserts per month and the size of the partition each query searches. On usage-priced plans the last number can swing the bill by two orders of magnitude.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get three real quotes. Price one usage-based service (Pinecone), one dimension-based service (Weaviate Cloud) and one provisioned service (Qdrant Cloud or Zilliz dedicated) for your exact workload.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Price self-hosting with people in it. Use the RAM formula to size the cluster, then add build effort and an honest ops fraction. If nobody on the team has run a stateful cluster through an upgrade, use the high end.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the break-even test. If the best managed quote sits below infrastructure plus the extra engineering cost, stay managed and revisit at the next scale step.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apply the non-cost filters. Residency, compliance, latency and lock-in can justify self-hosting or a bring-your-own-cloud option even when the math says otherwise.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Pilot-to-production budgeting
&lt;/h2&gt;

&lt;p&gt;Most AI teams move through three budget stages. A pilot fits inside managed minimums of $45–$50 a month, so the real cost is engineering time on ingestion and retrieval quality. A first production launch typically adds a support plan and a higher-SLA tier, which in our Growth scenario still lands under $1,000 a month on managed plans. Enterprise scale is where contracts, committed-use discounts and dedicated capacity enter, and where a self-hosted or bring-your-own-cloud option is worth pricing properly.&lt;/p&gt;

&lt;p&gt;Budget the vector database as one line in a larger retrieval stack. &lt;br&gt;
Embedding generation, reranking, LLM inference and evaluation tooling are excluded from this model and often cost more than the database itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;How much does a managed vector database cost per month?&lt;/p&gt;

&lt;p&gt;At pilot scale, roughly $45–$90 a month on Weaviate Cloud Flex or Pinecone Standard as of October 2026. At 20M vectors and 10M queries a month, our modeled range is about $160–$620 when data is partitioned well, and over $23,000 on Pinecone if every query scans one large namespace.&lt;/p&gt;

&lt;p&gt;Is self-hosting a vector database cheaper than Pinecone? &lt;/p&gt;

&lt;p&gt;The cloud bill usually is; the total cost usually is not. In our 20M-vector scenario, self-hosted infrastructure costs about $1,142 a month, but operations and build effort bring year one to $58K–$114K depending on where the team sits.&lt;/p&gt;

&lt;p&gt;How much RAM does a vector database need? &lt;/p&gt;

&lt;p&gt;A common estimate is vectors × dimensions × 4 bytes × 1.5 for float32 vectors held in memory. One million 1,536-dimension vectors need about 8.6 GiB before replication. Int8 quantization cuts that by roughly four times.&lt;br&gt;
When does self-hosting a vector database make sense? When managed quotes exceed the break-even line (about $3K–$5K a month at 20M vectors and $10K–$15K at 200M in our model), when data must stay in your own environment, or when an existing platform team can absorb the operations work.&lt;/p&gt;

&lt;p&gt;Does an offshore or nearshore team change the decision? &lt;/p&gt;

&lt;p&gt;It lowers the break-even point. At the rates used here, an offshore-operated cluster costs about 41–49% less in year one than the same cluster run by a US in-house team. It does not remove the need for at least two people who can handle an incident.&lt;/p&gt;

&lt;p&gt;How often should these numbers be re-checked? &lt;/p&gt;

&lt;p&gt;Quarterly. Weaviate changed its price book in September 2026, and Qdrant restructured its tiers in 2026, so cost guides in this category go stale quickly.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>cloud</category>
      <category>database</category>
    </item>
    <item>
      <title>Estimating the Cost of Running AI Evaluation Pipelines</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Fri, 16 Oct 2026 15:06:58 +0000</pubDate>
      <link>https://dev.to/ericthompson21/estimating-the-cost-of-running-ai-evaluation-pipelines-4m9f</link>
      <guid>https://dev.to/ericthompson21/estimating-the-cost-of-running-ai-evaluation-pipelines-4m9f</guid>
      <description>&lt;p&gt;Under the assumptions in this article, an AI evaluation pipeline costs about $400 a month in non-people spend for a pilot, about $5,300 a month for a single production AI feature, and about $35,000 a month for an enterprise program judging hundreds of thousands of cases. Add engineering time and the all-in figures become roughly $4,500, $25,500 and $84,000 a month with US in-house staff.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three findings hold across every scenario:
&lt;/h2&gt;

&lt;p&gt;• People cost more than tokens. Eval engineering and human review are 76–98% of the modeled total, depending on scale.&lt;br&gt;
• Judge model choice is the biggest technical lever. A small judge model costs about 1/20th of a mid-tier one per call, at current list prices.&lt;br&gt;
• Batch APIs halve offline eval spend. OpenAI, Anthropic and Google all list a 50% batch discount.&lt;br&gt;
Pricing period: list prices checked October 16, 2026, in USD, US region, before negotiated discounts. Cost guides like this go stale fast; treat it as due for a quarterly update.&lt;br&gt;
Scenario figures are illustrative estimates built from sourced prices and stated assumptions, not results from a real project. Swap in your own token counts and volumes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an evaluation pipeline includes (the cost components)
&lt;/h2&gt;

&lt;p&gt;An eval pipeline has six cost lines; most budgets only count the first two. Each is listed below with what drives it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;System-under-test inference. Re-running your app or agent on the test set for each offline run. Driven by test cases × runs per month × tokens per case.&lt;/li&gt;
&lt;li&gt;Offline judge calls. LLM-as-judge scoring of those outputs against rubrics or references. Driven by case-runs × criteria judged × judge model price.&lt;/li&gt;
&lt;li&gt;Online (production) evals. Judging a sample of live traffic for drift, safety and quality. Driven by production volume × sample rate × judge price.&lt;/li&gt;
&lt;li&gt;Human review. Expert or crowd labeling to build golden sets and calibrate judges. Driven by cases reviewed × minutes per case × hourly rate.&lt;/li&gt;
&lt;li&gt;Eval and observability tooling. Tracing, datasets, experiment tracking and dashboards. Driven by seats, traces or billable units, and retention.&lt;/li&gt;
&lt;li&gt;Engineering time. Building datasets, writing rubrics, maintaining CI gates and triaging failures. Driven by FTEs × loaded cost or vendor rate.
Two items are often double-counted. Online evals do not pay for system-under-test inference: production already paid for that response. And CI runner compute is usually negligible next to API calls, so this model leaves it out.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Sourced pricing inputs (October 2026)
&lt;/h2&gt;

&lt;p&gt;Every price below comes from a vendor pricing page checked on October 16, 2026. All are list prices in USD per million tokens unless noted.&lt;br&gt;
Judge model token prices&lt;br&gt;
Prices are shown as input / output, then batch input / batch output.&lt;br&gt;
• Frontier tier: Claude Opus 5.5 at $4.00 / $20.00; batch $2.00 / $10.00.&lt;br&gt;
• Mid tier: Claude Sonnet 5.5 and gpt-6.1-sol at $2.00 / $10.00; batch $1.00 / $5.00. Gemini 3.1 Pro Preview at $2.00 / $12.00 for prompts up to 200k tokens; batch $1.00 / $6.00.&lt;br&gt;
• Small/mid tier: Gemini 3.8 Flash at $0.75 / $3.75; batch $0.375 / $1.875.&lt;br&gt;
• Small tier: Claude Haiku 5.5 (prompts up to 100k tokens) and gpt-6-luna at $0.10 / $0.50; batch $0.05 / $0.25.&lt;br&gt;
Price notes that change the math:&lt;br&gt;
• Batch: all three vendors list a 50% batch discount, which suits nightly and pre-release eval runs.&lt;br&gt;
• Caching: Anthropic lists cache reads at 0.1× base input (0.05× on Opus and Sonnet 5.5). OpenAI lists cached input for gpt-6.1-sol at $0.10. A rubric repeated on every judge call is an ideal cache candidate.&lt;br&gt;
• Scheduled increases: Google lists Gemini 3.8 Flash rising to $1.50 input / $7.50 output from January 1, 2027.&lt;/p&gt;

&lt;h2&gt;
  
  
  Eval and observability platform pricing
&lt;/h2&gt;

&lt;p&gt;• Langfuse Cloud: Core $29, Pro $199, Enterprise $2,499 a month. Each includes 100k billable units; overage is $8 per 100k units, lower at volume.&lt;br&gt;
• Braintrust: Pro is $249 a month with 5 GB of processed data and 50k scores. Overage is $3/GB and $1.50 per 1,000 scores.&lt;br&gt;
• LangSmith: Plus is $39 per seat a month with 10k base traces, then pay-as-you-go.&lt;br&gt;
LangSmith no longer publishes a dollar rate per 1,000 traces on its pricing page. A third-party tracker reports about $5.00 per 1,000 base traces after a July 2026 metering change; confirm with LangChain before budgeting on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compute, labor and annotation inputs
&lt;/h2&gt;

&lt;p&gt;• GPU compute: an on-demand NVIDIA H100 SXM is $3.99 per GPU-hour (Lambda).&lt;br&gt;
• US engineering pay: median pay was $135,980 a year for software developers and $104,300 for QA analysts and testers in May 2025 (BLS).&lt;br&gt;
• Benefits load: benefits were 30.0% of private-industry compensation in June 2026 (BLS ECEC).&lt;br&gt;
• Outsourced senior developer rates: Asia $31–$41/hr, Latin America $60–$75/hr, Europe $64–$76/hr (Accelerance).&lt;br&gt;
• Crowd annotation floor: $8/hr minimum and $12/hr recommended participant pay (Prolific).&lt;/p&gt;

&lt;h2&gt;
  
  
  A transparent cost model you can rerun
&lt;/h2&gt;

&lt;p&gt;Monthly eval cost is the sum of the six lines above. Written out:&lt;br&gt;
C_{month} = N_{case} R \, c_{sut} + N_{case} R \, J_{off} \, c_{judge}^{batch} + V S \, J_{on} \, c_{judge} + H \, \frac{t}{60} \, w + T + F \, L&lt;br&gt;
Where N_case = test cases, R = offline runs per month, J = judge calls per case, V = production requests, S = sample rate, H = human-reviewed cases, t = minutes per review, w = reviewer hourly rate, T = tooling, F = FTEs and L = loaded monthly cost per FTE.&lt;/p&gt;

&lt;h2&gt;
  
  
  Assumptions (illustrative, not measured)
&lt;/h2&gt;

&lt;p&gt;• Judge call size: 2,000 input + 300 output tokens (rubric, input, candidate output and reference, plus a short scored rationale).&lt;br&gt;
• System-under-test call size: 1,500 input + 500 output tokens, typical of a single-turn RAG or assistant response. Agents run far larger.&lt;br&gt;
• Default judge and app model: mid tier at $2 / $10 per million tokens, matching Claude Sonnet 5.5 and gpt-6.1-sol list prices.&lt;br&gt;
• Offline runs: Batch API at 50% off, since nightly and pre-release runs tolerate batch latency.&lt;br&gt;
• Online judging: standard pricing, because teams usually want same-day drift signals.&lt;br&gt;
• Human review: 4 minutes per case at $45/hr. The domain-expert rate is an assumption; the crowd floor is $12/hr per Prolific.&lt;br&gt;
• Tooling: Langfuse list prices at 5–7 billable units per judged case (one trace plus spans and scores), ignoring volume discounts.&lt;br&gt;
• Loaded US FTE cost: $16,188 a month = BLS median $135,980 ÷ 0.70 wage share ÷ 12. AI specialists usually earn more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unit costs these assumptions produce
&lt;/h2&gt;

&lt;p&gt;• Small-tier judge call: $0.00035 standard, $0.000175 batch.&lt;br&gt;
• Mid-tier judge call: $0.0070 standard, $0.0035 batch.&lt;br&gt;
• Frontier-tier judge call: $0.0140 standard, $0.0070 batch.&lt;br&gt;
• Mid-tier system-under-test call: $0.0080 standard, $0.0040 batch.&lt;br&gt;
Worked example, mid-tier batch judge: 2,000 × $1.00/M + 300 × $5.00/M = $0.0020 + $0.0015 = $0.0035 per call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three budget scenarios
&lt;/h2&gt;

&lt;p&gt;Pilot. 500 golden cases, 20 offline runs a month, 1 judge call per case, no live traffic judged, 100 human-reviewed cases and 0.25 eval engineer.&lt;br&gt;
Production (one AI feature). 2,000 cases, 60 runs a month, 2 judge calls per case, 50,000 live requests judged (5% of 1M), 1,000 human-reviewed cases and 1.25 FTEs.&lt;br&gt;
Enterprise program. 10,000 cases, 60 runs a month, 3 judge calls per case, 400,000 live requests judged (2% of 20M), 5,000 human-reviewed cases and 3 FTEs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monthly results, line by line:
&lt;/h2&gt;

&lt;p&gt;• Pilot: system-under-test inference $40, offline judging $35, online judging $0, human review $300, tooling $29. Non-people subtotal $404. Engineering $4,047. All-in $4,451 a month, $53,412 a year.&lt;br&gt;
• Production: inference $480, offline judging $840, online judging $700, human review $3,000, tooling $273. Non-people subtotal $5,293. Engineering $20,235. All-in $25,528 a month, $306,336 a year.&lt;br&gt;
• Enterprise: inference $2,400, offline judging $6,300, online judging $8,400, human review $15,000, tooling $3,051. Non-people subtotal $35,151. Engineering $48,564. All-in $83,715 a month, $1,004,580 a year.&lt;br&gt;
Calculation check, Production offline judging: 2,000 cases × 60 runs × 2 calls × $0.0035 = $840. Production tooling: (120,000 + 50,000) judged cases × 6 units = 1.02M units; $199 + 9.2 × $8 = $273.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sensitivity: the judge model decides the token bill
&lt;/h2&gt;

&lt;p&gt;Monthly judging spend (offline plus online) by judge tier:&lt;br&gt;
• Small judge: $2 pilot, $77 production, $735 enterprise.&lt;br&gt;
• Mid judge: $35 pilot, $1,540 production, $14,700 enterprise.&lt;br&gt;
• Frontier judge: $70 pilot, $3,080 production, $29,400 enterprise.&lt;br&gt;
Moving the enterprise program from a frontier to a small judge saves about $28,700 a month on list prices. That saving is only real if the small judge agrees with human labels well enough; measure agreement on your own golden set before switching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-hosting a judge: when does a GPU pay off?
&lt;/h2&gt;

&lt;p&gt;One on-demand H100 at $3.99/hr running all month costs about $2,913 (730 hours). That equals roughly 832,000 mid-tier batch judge calls, or 16.6 million small-tier batch calls. Self-hosting an open-weight judge only beats the API when volume is high, utilization stays near full, and someone is paid to run the serving stack. For most teams below the enterprise scenario, API judges are cheaper.&lt;br&gt;
People cost: in-house vs offshore vs nearshore vs dedicated team&lt;br&gt;
Staffing model moves the Production scenario's all-in cost from about $25,500 to $11,500–$20,500 a month. The people line is where hiring decisions matter most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who you need
&lt;/h2&gt;

&lt;p&gt;• Eval / ML engineer: builds the harness, writes rubrics and judge prompts, wires CI gates, tracks judge-human agreement.&lt;br&gt;
• QA or annotation lead: curates golden sets, runs human review, writes labeling guidelines.&lt;br&gt;
• Domain reviewers: part-time experts (clinicians, lawyers, support leads) who label the hard cases.&lt;br&gt;
• Product owner: decides which failures block a release. Usually an existing role, so not costed here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production scenario (1.25 FTE) by staffing model
&lt;/h2&gt;

&lt;p&gt;All-in figures add the $5,293 non-people subtotal.&lt;br&gt;
• US in-house. $16,188 loaded per FTE gives $20,235 a month, or $25,528 all-in. Deepest product context, but the slowest and costliest to hire.&lt;br&gt;
• Nearshore, Latin America (senior). $60–$75/hr × 160 hours gives $12,000–$15,000, or $17,293–$20,293 all-in. Strong working-hour overlap with US teams.&lt;br&gt;
• Europe (senior). $64–$76/hr gives $12,800–$15,200, or $18,093–$20,493 all-in. Deep engineering pools with partial US overlap.&lt;br&gt;
• Offshore, Asia (senior). $31–$41/hr gives $6,200–$8,200, or $11,493–$13,493 all-in. Lowest rate; needs explicit handoff and review processes.&lt;br&gt;
• Hybrid: 0.25 US lead + 1.0 dedicated Asia engineer. $9,007–$10,607, or $14,300–$15,900 all-in. Keeps rubric ownership in-house and outsources build and upkeep.&lt;br&gt;
Rates come from the Accelerance 2026 guide summary, which covers general software development. Specialists in LLM evaluation often bill above those ranges, so treat them as a floor.&lt;br&gt;
The comparison is not like-for-like. Vendor rates include the vendor's overhead and benefits. The in-house figure excludes recruiting, management time and equipment. Outsourced models need internal oversight, which this table does not cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engagement models for eval work
&lt;/h2&gt;

&lt;p&gt;• Fixed-scope project. Best for building the first harness and golden set. Predictable one-off cost, but the pipeline decays after handover if nobody owns it.&lt;br&gt;
• Dedicated team (monthly). Best for ongoing eval upkeep across several AI features. Flat monthly cost, with low utilization if the AI roadmap stalls.&lt;br&gt;
• Time and materials. Best for uncertain scope and research-heavy agents. Flexible but harder to forecast; define release gates early to contain scope.&lt;br&gt;
• Staff augmentation. Best for filling one eval engineer seat in an existing team. Billed as rate × hours; knowledge stays with the individual unless it is documented.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pilot-to-production: where the eval budget jumps
&lt;/h2&gt;

&lt;p&gt;In this model, non-people eval spend rises about 13× from pilot to production ($404 to $5,293) while the test set grows only 4×. Three changes cause the jump, and each is a budgeting decision rather than an accident.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run frequency triples. A pilot runs evals when someone remembers. Production wires them into CI and nightly jobs, so case-runs go from 10,000 to 120,000 a month.&lt;/li&gt;
&lt;li&gt;Online judging starts. Sampling live traffic adds a cost line that did not exist in the pilot ($700 a month here), and it scales with usage, not with your test set.&lt;/li&gt;
&lt;li&gt;Human review becomes routine. Judges drift and need recalibration against human labels. Human review is the largest non-people line in both the production and enterprise scenarios.
For production-ready AI, budget the eval pipeline as a share of the feature's running cost, not as a one-off build. Enterprise AI implementation budgets that fund the model and the app but not ongoing evaluation risk shipping regressions they cannot measure.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Cost-reduction levers, largest first
&lt;/h2&gt;

&lt;p&gt;• Right-size the judge. Use small judges for format, schema and simple factuality checks; save mid or frontier judges for nuanced rubric scoring. In the enterprise scenario, the gap between small and frontier judges is about $28,700 a month.&lt;/p&gt;

&lt;p&gt;• Batch everything offline. The 50% batch discount is already in this model. Teams running offline evals on standard pricing pay double for the same scores.&lt;/p&gt;

&lt;p&gt;• Cache the rubric. The rubric and instructions repeat on every judge call. Anthropic lists cache reads at 5–10% of base input price, which cuts a large share of judge input cost.&lt;/p&gt;

&lt;p&gt;• Run tiered suites. Run a small smoke set on every pull request and the full golden set nightly or before release. Halving runs halves the offline lines.&lt;/p&gt;

&lt;p&gt;• Sample live traffic by risk. Judge 100% of flagged or high-value sessions and a low random rate of the rest, instead of one flat sample rate.&lt;/p&gt;

&lt;p&gt;• Spend human time on disagreements. Route only cases where judges disagree or score low confidence to reviewers. Human review is the largest line you control outside salaries.&lt;/p&gt;

&lt;p&gt;• Watch tooling meters. Retention upgrades and per-trace overages add up at enterprise volume. Negotiate annual commitments once volumes are stable.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How much does LLM-as-judge evaluation cost per test case?
&lt;/h2&gt;

&lt;p&gt;At October 2026 list prices and a 2,000-in / 300-out token judge call, one judgment costs about $0.00035 on a small model, $0.007 on a mid-tier model and $0.014 on a frontier model. Batch pricing halves each figure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is the API bill the biggest cost of AI evaluation?
&lt;/h2&gt;

&lt;p&gt;Usually not. In all three scenarios here, engineering time and human review make up 76–98% of the total. Token spend becomes material only at high volume with mid or frontier judges.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should a startup budget for evals on its first AI feature?
&lt;/h2&gt;

&lt;p&gt;Under this model, a pilot needs roughly $400 a month in non-people spend plus a quarter of an engineer's time. Moving that feature to production raises non-people spend to about $5,300 a month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should we self-host an open-weight judge model to save money?
&lt;/h2&gt;

&lt;p&gt;Only at high, steady volume. One on-demand H100 costs about $2,913 a month at $3.99/hr, equal to about 832,000 mid-tier batch judge calls. Below that, or with a small API judge, the API is cheaper and needs no serving team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it cheaper to outsource eval engineering?
&lt;/h2&gt;

&lt;p&gt;On rates alone, yes. For 1.25 FTEs, published senior rates put Asia at $6,200–$8,200 a month and Latin America at $12,000–$15,000, against about $20,200 loaded for US in-house staff. Factor in oversight time, timezone overlap and who owns the rubrics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which eval platform is cheapest?
&lt;/h2&gt;

&lt;p&gt;It depends on your meter. Langfuse bills per unit, Braintrust per GB and score, and LangSmith per seat and trace. Estimate your monthly traces and scores, then price all three against their current pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  How often should this cost estimate be updated?
&lt;/h2&gt;

&lt;p&gt;Quarterly. Vendors in this article have changed prices in 2026, and Google has already scheduled a Gemini 3.8 Flash increase for January 2027.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Calculating Token, Retrieval, and Observability Costs for a RAG Service</title>
      <dc:creator>Eric Thompson</dc:creator>
      <pubDate>Thu, 15 Oct 2026 15:09:49 +0000</pubDate>
      <link>https://dev.to/ericthompson21/calculating-token-retrieval-and-observability-costs-for-a-rag-service-2hb7</link>
      <guid>https://dev.to/ericthompson21/calculating-token-retrieval-and-observability-costs-for-a-rag-service-2hb7</guid>
      <description>&lt;p&gt;A typical RAG query (2,000 tokens of prompt, 2,500 tokens of retrieved context, and 400 tokens of output) on a mid-tier model costs about $0.013 in usage. Once retrieval, reranking, and observability are added, that comes to roughly $13 per 1,000 queries at production volume.&lt;/p&gt;

&lt;p&gt;In our model, a service handling 10,000 queries a month costs about $203 in usage, or about $234 with a 15% buffer for retries, query rewrites, and evaluation runs. At 100,000 queries a month, the bill is about $1,369, or $1,574 with the buffer. At 1 million queries a month, it reaches about $13,113, or $15,079 with the buffer. Ten times the traffic doesn't mean ten times the bill at lower volumes, because fixed fees such as plan minimums are shared across more queries.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Three findings matter more than the totals:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
LLM tokens are ~75–80% of usage cost at scale. Vector search is under 1%.&lt;br&gt;
Reranking is the surprise second line item (~15% at 100K+ queries).&lt;br&gt;
At low volume, people cost more than tokens. Half an AI engineer maintaining the service costs $3,300–$11,250 a month depending on location, 15–50× the usage bill at 10K queries.&lt;/p&gt;

&lt;p&gt;Every number below is either linked to a source or labelled as an illustrative assumption.&lt;/p&gt;

&lt;p&gt;The cost equation&lt;/p&gt;

&lt;p&gt;A RAG service has three kinds of cost:&lt;/p&gt;

&lt;p&gt;Monthly cost =&lt;br&gt;
    queries × (LLM + query embedding + vector read + rerank + observability per query)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fixed platform fees (plan minimums, seats, storage)&lt;/li&gt;
&lt;li&gt;corpus maintenance (re-embedding, writes)&lt;/li&gt;
&lt;li&gt;people (build, evaluation, on-call, iteration)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rest of this article prices each term.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Token costs: where most of the money goes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;The per-query token budget&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
We modelled a knowledge-assistant style RAG endpoint. These are illustrative assumptions; measure your own with real traffic before you trust any forecast.&lt;/p&gt;

&lt;p&gt;Each request starts with a 1,500-token system prompt of instructions. Because it's identical on every request, it can be cached and billed at a discounted rate. Next comes the user's message plus a short conversation history, about 500 tokens. Then the system adds the retrieved context: five chunks of 500 tokens each, or 2,500 tokens in total. Both of these change on every request, so they're billed at the full input price. Finally, the model writes an answer of about 400 tokens, billed as output. That's 4,900 tokens per request.&lt;/p&gt;

&lt;p&gt;Retrieved context is the largest input. Every extra chunk you stuff into the prompt is paid for on every single query.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Current list prices (October 2026)
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Model prices fall into four broad tiers, quoted per million tokens.&lt;/p&gt;

&lt;p&gt;Small tier (Claude Haiku 5.5 for prompts up to 100K tokens, and OpenAI's gpt-6-luna): $0.10 for input, $0.50 for output and $0.01 for cached input.&lt;br&gt;
Mid tier (Claude Sonnet 5.5 and gpt-6.1-sol): $2.00 for input, $10.00 for output and $0.10 for cached input. The two vendors price this tier identically, so the choice between them comes down to quality on your own evaluation set.&lt;br&gt;
Large tier: Claude Opus 5.5 charges $4.00 for input, $20.00 for output and $0.20 for cached input. gpt-6-astra charges $10.00, $50.00 and $1.00.&lt;/p&gt;

&lt;p&gt;Across every tier, output costs five times as much as input. That's why long answers cost more than long prompts of the same length.&lt;/p&gt;

&lt;p&gt;Sources: Anthropic and OpenAI official pricing pages, captured October 15, 2026. Both vendors offer roughly 50% off for asynchronous batch processing, which suits offline evaluation and re-indexing but not live chat.&lt;/p&gt;

&lt;h2&gt;
  
  
  Per-query calculation (mid tier, with prompt caching)
&lt;/h2&gt;

&lt;p&gt;System prompt: 1,500 × [0.95 × $0.10 + 0.05 × $2.50] / 1M = $0.00033&lt;br&gt;
Other input:   3,000 × $2.00 / 1M                        = $0.00600&lt;br&gt;
Output:          400 × $10.00 / 1M                       = $0.00400&lt;br&gt;
                                                  Total ≈ $0.01033 per query&lt;/p&gt;

&lt;p&gt;Without caching, the same query costs $0.0130. Caching saves about 20% here because the system prompt is only 30% of input; the retrieved context changes every query and can't be cached the same way.&lt;/p&gt;

&lt;p&gt;Running the same 4,900-token request through each tier shows how much the price list matters. On a small-tier model, a query costs about $0.00052, or $0.52 per 1,000 queries. On a mid-tier model, it's about $0.01033, or $10.33 per 1,000. Claude Opus 5.5 brings it to $0.02066, or $20.66 per 1,000, and gpt-6-astra to $0.05236, or $52.36 per 1,000. Nothing about the query changes between these figures; only the model does. For budgeting, multiply the per-1,000 figure by your expected traffic in thousands.&lt;/p&gt;

&lt;p&gt;The 100× spread between small and large tiers is the single biggest decision in your budget. Many teams route simple queries to a small model and escalate only hard ones; whether that works for you depends on your evaluation results, not on price alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Retrieval costs: embeddings, vector database and reranking
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;Embeddings: cheap enough to ignore (almost)&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
OpenAI's text-embedding-3-small is listed at $0.02 per 1M tokens.&lt;/p&gt;

&lt;p&gt;Initial corpus:  500M tokens × $0.02 / 1M = $10.00 one-off&lt;br&gt;
Monthly refresh: 10% of corpus            = $1.00&lt;br&gt;
Per query:       50 tokens × $0.02 / 1M   = $0.000001&lt;/p&gt;

&lt;p&gt;Embedding cost is negligible. The real cost of embeddings is engineering time spent on chunking strategy and re-indexing when you change models.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Vector database: small, but watch the pricing model&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
We used Pinecone serverless as the example because its pricing is usage-based and documented. The key rule, from Pinecone's cost documentation: a query consumes 1 read unit per GB of namespace size, with a 0.25 RU minimum, regardless of top_k.&lt;/p&gt;

&lt;p&gt;Index size:     1M vectors × (1,536 dims × 4 bytes + 1 KB metadata) ≈ 7.14 GB&lt;br&gt;
Read units:     ≈ 7.14 RU per query&lt;br&gt;
Read cost:      7.14 × $16 / 1M ≈ $0.000114 per query&lt;br&gt;
Storage:        7.14 GB × $0.33 ≈ $2.36 / month&lt;br&gt;
Plan minimum:   $50 / month (Standard)&lt;/p&gt;

&lt;p&gt;Unit rates are from a secondary source and should be confirmed in Pinecone's calculator; the $50 minimum and RU rule are from Pinecone's own pages.&lt;/p&gt;

&lt;p&gt;At 10K and 100K queries per month, you'll pay the $50 minimum. Even at 1M queries, the vector database costs about $120/month.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Two practical consequences:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Namespace size drives read cost. Partitioning by tenant or document type cuts RUs per query proportionally.&lt;br&gt;
If you already run Postgres, pgvector on existing infrastructure may cost nothing incremental at this scale. The trade-off is operational: you own tuning, scaling and backups.&lt;br&gt;
*&lt;em&gt;Reranking: the line item people forget&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
A cross-encoder reranker takes the top 50 candidates and picks the best 5. Cohere defines one search as one query with up to 100 documents, and Rerank 4 Fast is listed at $2.00 per 1,000 searches (secondary source, verify).&lt;/p&gt;

&lt;p&gt;Per query: $0.002&lt;br&gt;
At 100K queries/month: $200&lt;br&gt;
At 1M queries/month:   $2,000&lt;/p&gt;

&lt;p&gt;That's about 15% of usage cost at scale, and more than the vector database by an order of magnitude. Reranking often improves answer quality enough to let you send fewer chunks to the LLM, which can pay for itself. Test both configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Observability costs: per-unit vs per-trace pricing
&lt;/h2&gt;

&lt;p&gt;You can't run RAG in production without tracing retrieval quality, latency and token spend. The two common hosted options price differently.&lt;/p&gt;

&lt;p&gt;Langfuse Cloud charges per unit, where every trace, observation and score you record counts as one unit. Its Core plan costs $29 a month and includes 100,000 units, with additional usage at $8 per 100,000 units (lower at higher volumes). LangSmith charges per seat and per trace. Its Plus plan costs $39 per seat per month and includes 10,000 base traces, with additional traces at about $2.50 per 1,000, kept for 14 days.&lt;/p&gt;

&lt;p&gt;In practice, a small team with lots of traffic tends to favour unit pricing, while a large team with modest traffic may find per-trace pricing easier to predict.&lt;/p&gt;

&lt;p&gt;Sources: Langfuse and LangChain official pricing pages. LangSmith overage rate from a June 2026 secondary source; verify before budgeting.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Translating that to per-query cost&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
In Langfuse, a single RAG request typically produces one trace plus several observations (embed, retrieve, rerank, generate, guardrail, post-process) and maybe an automated score. Assumption: 8 units per query.&lt;/p&gt;

&lt;p&gt;At 10,000 queries a month, that's 80,000 units, inside Langfuse's included allowance, so the bill is just the $29 plan fee. LangSmith comes to $117, which is three seats at $39 each. At 100,000 queries, Langfuse rises to about $85 and LangSmith to about $342, as per-trace charges kick in above 10,000 traces. At 1 million queries, Langfuse reaches about $661 at list rates, while LangSmith reaches about $2,592. The gap between the two widens as traffic grows.&lt;/p&gt;

&lt;p&gt;Illustrative; both vendors discount at volume and both can be self-hosted, which swaps subscription cost for infrastructure and engineering time.&lt;/p&gt;

&lt;p&gt;Observability can quietly reach 5–20% of usage cost. Sampling (tracing 10–20% of production traffic in full while logging tokens for 100%) is a common way to control it.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Three monthly scenarios, line by line
&lt;/h2&gt;

&lt;p&gt;These scenarios use the mid-tier model with prompt caching on, and Langfuse for observability.&lt;/p&gt;

&lt;p&gt;At 10,000 queries a month, LLM tokens cost $103.30, reranking $20.00 and observability $29.00. The vector database costs $50.00, which is simply Pinecone's plan minimum. Query embeddings cost a cent, and refreshing a tenth of the corpus each month costs $1.00. The total is $203.31, or $20.33 per 1,000 queries, rising to $233.81 with the 15% buffer. At this volume, the vector database is a quarter of the bill, purely because of its minimum fee.&lt;/p&gt;

&lt;p&gt;At 100,000 queries a month, LLM tokens rise to $1,033.00 and reranking to $200.00. Observability comes to $85.00, and the vector database stays at its $50.00 minimum. Embeddings cost $0.10 and corpus refresh $1.00. The total is $1,369.10, or $13.69 per 1,000 queries, and $1,574.46 with the buffer.&lt;/p&gt;

&lt;p&gt;At 1 million queries a month, LLM tokens reach $10,330.00 and reranking $2,000.00. Observability is $661.00, and the vector database finally rises above its minimum to $119.52. Embeddings cost $1.00 and corpus refresh $1.00. The total is $13,112.52, or $13.11 per 1,000 queries, and $15,079.40 with the buffer. LLM tokens now account for almost four-fifths of spending and reranking for most of the rest, while embeddings and storage barely register.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What happens if you change the model&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Holding everything else constant at 1 million queries a month, the model choice dominates the bill. With a small-tier model, LLM cost falls to about $524 and the usage total to about $3,300. The mid-tier model gives the $10,330 LLM cost and ~$13,100 total above. Claude Opus 5.5 pushes LLM cost to $20,660 and the total to about $23,400, and gpt-6-astra to $52,363 and about $55,100. Each total includes the same $2,783 of retrieval, reranking and observability, so the difference is entirely the LLM line. Moving from the cheapest tier to the most expensive one makes the bill roughly 17 times larger.&lt;/p&gt;

&lt;p&gt;Per-1,000-query cost falls as volume grows only because fixed fees get spread thinner. After roughly 100K queries, the bill becomes almost entirely variable.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The line item that dwarfs tokens at low volume: people
&lt;/h2&gt;

&lt;p&gt;A production RAG service needs ongoing work: evaluation sets, chunking and prompt changes, regression testing when models update, cost monitoring, and incident response. Assumption: 0.5 FTE AI engineer for maintenance, roughly 20 hours a week.&lt;/p&gt;

&lt;p&gt;Done in-house in the US, at a fully loaded cost of about $150 an hour, that half-engineer costs about $11,250 a month. Outsourced to Central and Eastern Europe at about $80.50 an hour, it costs about $6,440. In Latin America, at about $77.63 an hour, it's about $6,210. In Asia, at about $41.40 an hour, it's about $3,312.&lt;/p&gt;

&lt;p&gt;The US figure is what a company pays its own employee including benefits, while the outsourced figures are vendor-billed rates with overhead and margin already included. The cheapest location isn't automatically the best value, because time-zone overlap, review effort and rework can narrow the gap.&lt;/p&gt;

&lt;p&gt;US rate derived from a $185K base salary and BLS's June 2026 benefits share (wages at 68.5% of compensation for full-time private-industry workers). Outsourced rates from Accelerance 2026 senior bands plus a 15% AI premium. Illustrative.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What this means for the build-vs-buy-vs-outsource decision:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
At 10K queries/month, usage is ~$200 and maintenance labour is $3,300–$11,250. Your real cost question is who maintains the system, not which model you pick.&lt;br&gt;
At 1M queries/month, usage (~$13K) exceeds the labour cost in every location, and model routing and prompt efficiency start paying for an engineer's time.&lt;br&gt;
A hybrid model is common: one internal owner for evaluation and architecture, with build and maintenance capacity from a nearshore or offshore team. Keep the evaluation dataset and the prompt/retrieval configuration under your own version control regardless of who writes the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Sensitivity: which levers move the bill?
&lt;/h2&gt;

&lt;p&gt;To see which decisions matter most, we changed one setting at a time in the 100,000-query mid-tier scenario, which has a base cost of about $1,369 a month.&lt;/p&gt;

&lt;p&gt;Switching to a small-tier model has by far the largest effect, cutting about $980 a month, or 72%, because tokens are the dominant cost. Retrieving three chunks instead of five removes 1,000 input tokens per query and saves $200, or 15%. Shortening answers from 400 to 250 tokens saves $150, or 11%, since output tokens cost five times as much as input. Dropping the reranker would also save $200, or 15%, but is likely to hurt answer quality.&lt;/p&gt;

&lt;p&gt;Some changes raise costs instead. Turning off prompt caching adds about $270, or 20%, because the system prompt is then billed at the full rate. Switching observability to LangSmith with three seats adds about $257 through seat and per-trace charges. Partitioning the vector index into smaller namespaces saves essentially nothing at this volume, because you're paying Pinecone's $50 minimum either way.&lt;/p&gt;

&lt;p&gt;These are effects on cost only. Retrieving fewer chunks or removing the reranker may lower answer quality, so test those changes before adopting them.&lt;/p&gt;

&lt;p&gt;The lesson: optimise tokens first, reranking second, everything else later.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;**How much does a RAG query cost? &lt;br&gt;
**In our model, a mid-tier RAG query costs about $0.013 all-in (~$13 per 1,000 queries) at 100K+ queries/month. With a small model it can drop below $0.003; with a frontier model it can exceed $0.05.&lt;/p&gt;

&lt;p&gt;**What is the biggest cost in a RAG system? &lt;br&gt;
**LLM tokens at scale — specifically input tokens from retrieved context. At low volume, engineering time to maintain and evaluate the system is larger than all usage costs combined.&lt;/p&gt;

&lt;p&gt;**How much does a vector database cost for RAG? &lt;br&gt;
**For a ~7 GB index (1M chunks), serverless vector search costs roughly $50–$120/month at 10K–1M queries in our model. Plan minimums dominate at low volume.&lt;/p&gt;

&lt;p&gt;**Does prompt caching reduce RAG costs? &lt;br&gt;
**Yes, but less than in chatbots with long static prompts, because retrieved context changes each query. In our example, caching cut LLM cost by about 20%.&lt;/p&gt;

&lt;p&gt;**How much should I budget for LLM observability? &lt;br&gt;
**Roughly $30–$350/month at 10K–100K queries and $650–$2,600/month at 1M queries in our model, depending on tool and seats. Sampling traces reduces this.&lt;/p&gt;

&lt;p&gt;**Should I self-host the vector database and observability stack? &lt;br&gt;
**Self-hosting removes subscription fees but adds infrastructure and engineering time. At the volumes modelled here, the subscription line items are small relative to a half-FTE engineer, so self-hosting usually makes sense for data-residency or compliance reasons rather than cost.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>llm</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
