AI System DesignAI System Design FundamentalsModule 01 — Architecture fundamentals
Evaluating Build-Versus-Buy Decisions for AI Models, Infrastructure, and Services
Question 18 of 47 · Updated
On this page
- 1. Build and buy are not binary choices
- 2. Start from the mandatory requirements
- 3. Model acquisition: four distinct strategies
- Hosted proprietary model API
- Managed hosting of selected weights
- Self-hosting existing weights
- Train a model internally
- 4. Proprietary, open-weight and open-source distinctions
- 5. Managed infrastructure versus self-managed services
- 6. Total cost of ownership: define one accounting boundary
- 7. Worked scenario: API versus self-hosted model
- 8. Break-even volume and investment payback
- 9. Sensitivity analysis and uncertainty
- 10. Compare equivalent useful outcomes
- 11. Practical implementation: exact financial arithmetic
- 12. Time to market and organizational capability
- 13. Customization and product differentiation
- 14. Privacy, security and supply-chain responsibilities
- 15. Reliability, support and vendor dependency
- 16. Vendor lock-in and reversibility
- 17. Migration strategy as a sourcing option
- 18. Worked hybrid sourcing case
- 19. Prepare the sourcing decision record
- 20. Production monitoring and triggers to revisit
- 21. Common mistakes and trade-offs
- 22. Interview-ready answer
- References and research transparency
Build the capabilities that provide defensible product differentiation or require control unavailable from suppliers; buy interchangeable capabilities when a supplier can satisfy the same functional, quality, security, reliability and legal requirements at lower lifecycle cost or materially faster time to value. Make the decision separately for model ownership, adaptation, inference operation, data infrastructure and business workflow. Compare equivalent useful outcomes rather than model names or infrastructure list prices. Exclude any option that fails a mandatory control. Keep an explicit exit plan and revisit the sourcing decision when the workload, capabilities, contracts or organizational skills change.
Original curriculum question: How do you evaluate build-versus-buy decisions for AI models, infrastructure and managed services?
Module 01 — Architecture fundamentals | ASD-005. ASD-001 decides which computational architecture fits a problem; ASD-002 establishes measurable requirements; ASD-003 estimates the workload and resources; ASD-004 selects execution contracts. This lesson answers a different question: who supplies, controls and operates each selected capability, and how does that choice affect lifetime economics, risk, time to market and reversibility? The existing MLOps article on choosing managed services versus a self-hosted stack provides a useful introductory platform comparison. The existing LLM lesson on GPU capacity and cost per SLO-compliant inference request explains component-level economics. Here we use those as prerequisites to develop an integrated sourcing and investment decision covering model licensing, operating responsibilities, opportunity cost, contract constraints, migration economics and hybrid ownership. ASD-025 covers the actual multi-provider gateway architecture, ASD-029 the detailed product migration between incompatible providers, and ASD-030 controlled comparisons of prompting, RAG and model adaptation. This article does not replace those implementation lessons.
All numerical scenarios, rates, team sizes, timing and model results in this article are hypothetical planning inputs in USD, not live quotations or measured provider performance. Contractual and licensing considerations require qualified review of the actual documents for the intended use. The Python financial example was executed locally; no commercial service or GPU benchmark was conducted.
1. Build and buy are not binary choices#
A team might buy access to a foundation model, own its retrieval and evaluation systems, rent GPU capacity, deploy its own adapted model, and rely on a managed database. It is therefore misleading to classify the whole product as either built or bought. Define sourcing decisions at boundaries that can be independently operated and replaced.
| Layer | Build or operate internally | Buy or outsource | What remains the customer's responsibility |
|---|---|---|---|
| Business workflow | Domain-specific logic, user experience, policies, integrations | Vertical SaaS or configurable workflow product | Fit to business, authority, outcomes and oversight |
| Model | Train a specialist model or acquire rights and adapt weights | Hosted proprietary model API or licensed model | Evaluation, appropriate use, data rights and output quality |
| Inference | Operate serving runtime on owned or rented hardware | Managed model endpoint or hosted inference API | Workload contract, integration, latency and fallback |
| Retrieval and state | Own indexing, schemas and deployment | Managed database, search or vector service | Authorization, data lifecycle, index correctness |
| Platform | Operate orchestration, registry and monitoring | Managed training, observability and deployment | Model approvals, application security, operational governance |
Model access and infrastructure ownership are independent. Open weights can be hosted by a commercial inference provider. A proprietary model might be licensed for private deployment if its vendor offers that arrangement. A self-operated model can run on rented cloud infrastructure. A managed endpoint may use a model chosen and fine-tuned by the customer. Do not equate "open weight" with self-hosting or "managed" with public multi-tenant data exposure.
A useful first deliverable is an ownership map with a named owner for each component, its data, its interfaces, its release process, and its failure response. A supplier may implement a control, but the customer still needs evidence that the entire system meets its obligations.
2. Start from the mandatory requirements#
Treat build-versus-buy as a constrained selection problem, not an informal vote. Write the required task contract, quality threshold, allowed data flows, reliability and latency objectives, integration requirements and delivery deadline before interviewing vendors or estimating hardware.
Illustrative requirements for an enterprise document assistant:
- Answer questions using currently authorized internal documents and provide traceable evidence.
- Never reveal a restricted document through retrieval, generation, caching or diagnostic logs.
- Meet an agreed useful-response quality target on the representative task population, including abstentions and handoffs.
- Meet a defined end-to-end latency and availability objective.
- Process data only within the approved purpose, contractual retention and geographic boundaries.
- Maintain an auditable model/version lineage and a tested service-recovery procedure.
- Launch within an approved time and budget while preserving future portability.
The first four requirements are not interchangeable with cost savings. If a low-priced model cannot meet the evidence contract, remove it or constrain its permitted use. If an external processor cannot satisfy a mandatory data-handling requirement, exclude that arrangement even when its accuracy is excellent. If self-hosting cannot provide the necessary staffing or resilience by the launch deadline, it may be operationally infeasible.
Requirements should be grounded in ASD-002's versioned measurement and acceptance contracts. Estimate each feasible candidate's own workload envelope using ASD-003, rather than assuming different runtimes have identical capacity.
The sequence uses evidence gates before economic ranking. A weighted scorecard must not allow excellent price or performance to compensate for prohibited data use or unacceptable safety risk.
3. Model acquisition: four distinct strategies#
Hosted proprietary model API#
The customer invokes a model through a provider-operated service. This may avoid acquiring hardware, deploying serving software and maintaining model artifacts. It can accelerate experimentation, provide access to capabilities unavailable internally and accommodate uncertain early demand.
Trade-offs include variable usage charges, quotas, dependence on the provider's supported model versions, behavioral changes, data-processing arrangements and API-specific features. A service can expose a version identifier without giving access to its weights or reproducing historical outputs indefinitely. Check the actual version pinning, retirement notice, regional availability, retention, support and incident terms.
Use hosted access when representative task performance, permitted data processing and commercial terms justify the external dependency. The customer still owns application-level authorization, business-policy enforcement, evaluation and fallback.
Managed hosting of selected weights#
A managed endpoint can operate a selected open-weight or licensed model while exposing configuration controls, scaling or private networking. This separates the model-selection decision from the runtime-operations decision.
The customer may retain model artifacts, adapters and more version control, while the provider owns much of the platform operation. Confirm who maintains the serving runtime, compatible kernels, drivers, image security, upgrades, capacity and recovery. Managed hosting may bill for provisioned hours, requests, tokens, reserved capacity or another unit. Do not assume it shares the economics of a general hosted token API.
Self-hosting existing weights#
Operating the runtime internally may improve control over deployment versions, network boundaries, supported customization and resource scheduling. It can support specialized latency, locality or isolation requirements and may reduce costs under sustained, predictable workloads.
It requires a team that can evaluate models, verify licenses and artifacts, allocate accelerators, handle queueing and scaling, patch dependencies, operate health and monitoring systems, respond to incidents and test recovery. The model may be free to download while deployment and ongoing maintenance remain expensive.
The choice is also bounded by achievable quality. A smaller self-hosted model that requires substantially more escalations or fails key tasks may be more expensive per useful outcome even if its inference price is lower.
Train a model internally#
Training a narrowly scoped classifier, forecasting model or ranking model can be rational when domain-specific data and decisions create product value. Training a foundation model from scratch is a fundamentally different investment, involving substantial data curation, compute, distributed training expertise, evaluation, safety work and future serving costs. It should not be inferred as the default next step after deciding to self-host.
Evaluate the marginal business benefit of proprietary training over existing models and adaptation. Confirm the organization has the necessary data rights, quality, capacity and ownership. For many products, the durable advantage comes from approved domain data, task-specific evaluations, workflow integration and user trust, not ownership of all model weights.
4. Proprietary, open-weight and open-source distinctions#
Open-weight means that model parameters are made available under some terms. It does not by itself establish rights to redistribute the model, operate a commercial service, fine-tune it, distribute derivatives, use the training data or deploy it in every domain. Some licenses impose field-of-use, attribution, distribution or scale restrictions. Model weights, software runtime, tokenizer, dataset and adapters may be licensed differently.
Open-source software and open-source AI are not identical concepts. Review the applicable definition and actual license of each artifact rather than relying on the marketing label. The Open Source Initiative's Open Source AI Definition is a useful reference for discussing rights and information needed to exercise them; it is not a substitute for reviewing the model's legal terms.
For proprietary APIs, the vendor retains control over the service and underlying artifacts according to its contract. The customer must understand permitted use, output and derivative rights, data-processing terms, model changes, retention and restrictions on benchmarking or using outputs to train another system. Never assume that an API subscription grants a right to export the underlying model or use every generated output for any purpose.
Before procurement or deployment, create an evidence register:
| Item | Evidence to collect |
|---|---|
| Weight and runtime rights | Exact license and artifact/version identifiers |
| Commercial use | Permitted deployment, use and distribution scope |
| Adaptation | Rights and obligations for fine-tuning, merging or distributing adapters |
| Data | Training/evaluation rights, customer inputs, retention and deletion terms |
| Outputs | Ownership or permitted use, restrictions, indemnity terms where applicable |
| Dependencies | Software and model bills of materials, notices and vulnerability review |
| Exit | Export formats, deletion evidence, contract termination and transition assistance |
A license compatibility decision is not something an inference benchmark can settle. Obtain qualified legal, security and procurement approval for the intended use. Reassess on model upgrade or changed commercial arrangement.
5. Managed infrastructure versus self-managed services#
The same decision applies to databases, vector search, workflow engines, observability, container orchestration and training platforms. A team should not build a new database or distributed scheduler merely because it wants to own an AI product. Identify whether the component is a source of differentiation, a mandatory control point, or a commodity capability.
A managed database can save operational effort, but a customer must still design schemas, indexes, access policies, backup validation and workload limits. Self-operating a vector store can enable unusual placement or custom indexing, but introduces upgrades, data integrity checks, replication, rebuilds and incident responsibilities. Using a managed training platform can reduce cluster lifecycle work without removing responsibility for dataset correctness, reproducibility and promotion gates.
For each alternative, compare:
| Dimension | Key question |
|---|---|
| Capability fit | Does it support actual query types, model/runtime, performance and integration contracts? |
| Customization | Are needed controls available without fragile workarounds? |
| Operations | Who patches, scales, monitors, restores and participates in incidents? |
| Data location | Where do primary, replica, backup, telemetry and support data go? |
| Recovery | Are restore, export and failover capabilities demonstrable under the required objective? |
| Portability | Can the customer recreate data, semantics and configurations elsewhere? |
| Economics | What is paid during idle, peak, rebuild and failure periods? |
A provider's shared-responsibility documentation describes the general division of responsibilities, but its details vary by service and contract. Build a control-by-control RACI (responsible, accountable, consulted, informed) or equivalent ownership matrix. Do not count a responsibility as outsourced merely because a provider offers a related feature.
6. Total cost of ownership: define one accounting boundary#
Total cost of ownership (TCO) is the cost of obtaining and operating a capability over an agreed horizon, including the material costs of integration, change, reliability and exit. A fair comparison uses the same workload, task definition, quality gates, scope, horizon and currency.
TCO =
one-time implementation, procurement and migration cost
+ fixed recurring capacity and operating cost
+ usage-dependent inference, storage, network and service cost
+ evaluation, maintenance, security and support cost
+ human review, retry and remediation cost
+ relevant expected transition/exit costAvoid double counting. If a managed GPU rate already includes a runtime charge, do not count it again. If a platform team serves several products, allocate its attributable labor and shared resources by a defensible method. Distinguish incremental cash flow, fully loaded accounting cost and opportunity cost; choose the accounting boundary appropriate to the decision and show the other perspectives separately if needed.
One-time costs may include adapting interfaces, onboarding a provider, security assessment, migrating data, rebuilding indexes, testing and training staff. Recurring costs may include dedicated infrastructure, standby capacity, engineering, support, subscription minimums and audits. Variable costs can include token usage, GPU work not included in reserved capacity, operations per record, retries, external tools, egress and human review. Add expected costs of failure only when reasonably estimable; avoid presenting speculative risk estimates as facts.
A self-hosted stack has step changes in cost when the next replica is needed. A hosted service can have tiered discounts, minimum commitments, cached-input prices and output-length variation. Use a piecewise cost model when a single constant variable rate is inadequate.
The preferred denominator is a successful business task that satisfies the required quality and latency contract, not the number of raw tokens generated or attempted requests. If 97% of offered tasks succeed under the agreed evaluation, a million offered tasks yield an expected 970,000 successes under that assumption. Measure coverage, abstention, human review and unresolved work consistently.
7. Worked scenario: API versus self-hosted model#
Suppose a support assistant has two feasible model-serving options. Both have passed the same required functional, quality and control gates in this fictional planning scenario, and both are assumed to achieve 97% successful tasks. The estimates below isolate the costs that differ between options; shared application costs cancel only if they are genuinely equal.
| Cost input | Hosted API | Self-hosted weights |
|---|---|---|
| One-time transition and setup | $0 incremental | $30,000 |
| Monthly fixed cost | $2,000 | $14,000 |
| Variable cost per offered task | $0.04 | $0.01 |
| Assumed task success | 97% | 97% |
The hosted fixed cost represents attributed integration/operations and minimum recurring obligations. The self-hosted fixed cost represents the assumed baseline fleet and operating staff. The $0.01 variable term represents incremental consumption and other workload-dependent costs not included in the fixed cost. These are invented accounting assumptions, not a current price list. Before applying them, verify that the assumed fleet remains feasible over the selected volume range.
Let Q be constant offered tasks per month:
API monthly run rate = 2000 + 0.04 × Q
Self-host monthly run rate = 14000 + 0.01 × QAt 100,000 tasks/month, API run rate is $6,000 and self-host run rate is $15,000. Over 12 months, including setup, API costs $72,000 and self-host costs $210,000. Buying is cheaper by $138,000 under these assumptions.
At 1,000,000 tasks/month, API run rate is $42,000 and self-host run rate is $24,000. Over 12 months, API costs $504,000 and self-host costs $318,000, including the $30,000 setup. Self-hosting is cheaper by $186,000 under the assumed feasible capacity envelope.
Do not generalize the conclusion to a specific provider. At high load, a fleet expansion may alter the fixed cost; at low load, autoscaling may reduce it. If the self-hosted model needs higher review effort, greater context, retries or a hosted fallback, the cost slope changes.
8. Break-even volume and investment payback#
The steady monthly cost crossing solves:
2000 + 0.04Q = 14000 + 0.01Q
Q = 12000 / 0.03 = 400000 tasks/monthAt exactly 400,000 tasks per month, ongoing costs are equal; the self-host setup cost has not yet been recovered. For a constant monthly volume over M months, compare the full horizon costs:
Q* = [(setup_B - setup_A)/M + fixed_B - fixed_A]
/ (variable_A - variable_B)For 12 months:
Q* = (30000/12 + 14000 - 2000) / 0.03
= 14500 / 0.03
= 483333.333... tasks/monthAt integer monthly volumes, self-hosting first becomes strictly cheaper at 483,334 tasks/month under this linear equal-success model. At 500,000 tasks/month the API costs $22,000/month and self-host costs $19,000/month. Twelve-month totals are $264,000 and $258,000 respectively, so the estimated advantage is only $6,000; a small assumption error could change the decision.
For a constant workload of one million tasks/month, recurring savings from self-hosting are $18,000/month. A $30,000 incremental setup investment therefore has a simple payback of 30,000/18,000 = 1.667 operating months *after the new arrangement begins saving money*. This excludes build duration, dual-running costs, financing, taxes and delays. At the steady-cost crossover the recurring savings are zero, so there is no finite payback of a positive incremental setup cost.
Do not confuse break-even between two sourcing options with a product's revenue-versus-cost break-even. If the marginal costs are equal, there is no volume-dependent crossing: the fixed and setup difference determines the cheaper arrangement. If the proposed alternative has a higher variable cost, the direction of the inequality reverses. If it is already cheaper at zero volume with a lower slope, it remains cheaper in the modeled nonnegative range. Outside the validated capacity range the linear formulas do not apply.
For changing monthly demand, compute total over the actual volume sequence. For long horizons or different cash-flow timing, finance may use discounted cash flow: discount each period's incremental cash flow to the same valuation date using an approved consistent rate, account for exit or residual value, and compare risk-adjusted scenarios rather than a single undiscounted threshold. This article's numerical example uses undiscounted TCO, not NPV or an investment guarantee.
9. Sensitivity analysis and uncertainty#
Demand forecasts rarely arrive exactly as predicted. Suppose monthly offered tasks are constant within each of three scenarios:
| Monthly tasks | API 12-month TCO | Self-host 12-month TCO | Lower cost |
|---|---|---|---|
| 100,000 | $72,000 | $210,000 | API |
| 500,000 | $264,000 | $258,000 | Self-host by $6,000 |
| 1,000,000 | $504,000 | $318,000 | Self-host by $186,000 |
These comparisons assume the same cost coefficients and feasible success rate at each load. In practice, rerun capacity and quality tests for every materially different scenario. A high-volume plan that needs additional accelerators changes the cost table.
At 500,000 tasks/month, increasing self-host variable cost from $0.010 to $0.012 increases 12-month costs by $12,000, reversing the original $6,000 advantage. Reducing hosted unit cost from $0.04 to $0.03 shifts the twelve-month crossing to $14,500/$0.02=725,000 tasks/month. Increasing self-host fixed costs by $3,000/month shifts the original crossing to $17,500/$0.03, approximately 583,333 tasks/month.
Cost uncertainty can arise from token distributions, peak-to-average ratio, model refresh, support commitments, accelerator availability, actual staffing, power and cooling (for owned hardware), exchange rates and pricing changes. Evaluate plausible correlated conditions, such as demand growth accompanied by longer prompts and more review. Do not multiply an optimistic throughput estimate by an optimistic utilization estimate and present the result as a conservative plan.
For high capital commitment or uncertain adoption, stage investments. A small managed deployment can reveal workload and quality characteristics before purchasing capacity. A prototype is not free, however: account for integration and eventual migration work. A reversible pilot can have option value when it avoids a costly irreversible commitment before evidence is available.
10. Compare equivalent useful outcomes#
The equal 97% success assumption simplifies the first crossover. Suppose at one million offered tasks/month, a hosted candidate resolves 99% of tasks while a self-hosted model resolves 90%, and the product's mandatory representative quality threshold is 95%. The self-hosted candidate fails the hard gate and is not selected solely because its cost is lower.
Even when both meet the minimum, account for the difference. If the API resolves 98% and self-host resolves 96%, use the expected successful tasks for each denominator. At one million monthly tasks over 12 months:
API: 504000 / (12000000 × 0.98) ≈ $0.042857 per success
Self-host: 318000 / (12000000 × 0.96) ≈ $0.027604 per successA lower cost per success is not equivalent to a higher total business value: there may be a cost of lost or delayed resolutions, severe failure classes, or differences in user satisfaction. Include actual review effort and error costs when supported by evidence, and enforce separate cohort-specific and high-severity gates.
If a smaller model routes difficult requests to a stronger hosted model, account for the attempts rather than comparing small-model and hosted prices in isolation. A routing choice changes the workload distribution and can bias quality comparisons. Measure end-to-end outcomes under the real routing policy, with the same offered-task denominator. A fallback is only valid where data rights, capacity and functionality permit it.
11. Practical implementation: exact financial arithmetic#
The following Python example compares undiscounted TCO across a sequence of monthly volumes, computes a directional crossover for an alternative with lower marginal cost, and chooses the eligible plan with the lowest projected cost per successful offered task. Costs use integer cents and rational fractions, including fractional cents where useful for aggregate analysis. This avoids rounding the monthly crossover or repeatedly rounding fractional usage charges.
PYTHONfrom dataclasses import dataclass from fractions import Fraction @dataclass(frozen=True) class Plan: name: str setup_cents: int fixed_cents: int variable_cents: Fraction success: Fraction eligible: bool = True def __post_init__(self): if any(type(x) is not int or x < 0 for x in (self.setup_cents, self.fixed_cents)): raise ValueError('invalid fixed costs') if not isinstance(self.variable_cents, Fraction) or self.variable_cents < 0: raise ValueError('invalid variable cost') if not isinstance(self.success, Fraction) or not 0 < self.success <= 1: raise ValueError('invalid success fraction') if type(self.eligible) is not bool: raise ValueError('invalid eligibility') def tco(self, volumes): if any(type(n) is not int or n < 0 for n in volumes): raise ValueError('invalid volume') return self.setup_cents + self.fixed_cents * len(volumes) + self.variable_cents * sum(volumes) def crossover(a, b, months): if type(months) is not int or months <= 0: raise ValueError('invalid horizon') slope = a.variable_cents - b.variable_cents if slope <= 0: return None # no decreasing cost gap in favor of b as volume rises return max(Fraction(0), (Fraction(b.setup_cents-a.setup_cents, months) + b.fixed_cents-a.fixed_cents) / slope) def choose(plans, volumes, min_success): if not isinstance(min_success, Fraction) or not 0 < min_success <= 1: raise ValueError('invalid quality gate') volumes = tuple(volumes) if not volumes or any(type(n) is not int or n < 0 for n in volumes) or not sum(volumes): raise ValueError('positive workload required') candidates = [p for p in plans if p.eligible and p.success >= min_success] return min(candidates, key=lambda p: (p.tco(volumes)/(sum(volumes)*p.success), p.name), default=None) api = Plan('api', 0, 200_000, Fraction(4), Fraction(97,100)) local = Plan('self', 3_000_000, 1_400_000, Fraction(1), Fraction(97,100)) assert api.tco([100_000]*12) == 7_200_000 assert local.tco([100_000]*12) == 21_000_000 assert api.tco([1_000_000]*12) == 50_400_000 assert local.tco([1_000_000]*12) == 31_800_000 assert crossover(api, local, 12) == Fraction(1_450_000,3) assert crossover(local, api, 12) is None assert choose([api, local], [100_000]*12, Fraction(95,100)) == api assert choose([api, local], [1_000_000]*12, Fraction(95,100)) == local assert choose([api, local], [1_000_000], Fraction(99,100)) is None blocked = Plan('blocked', 0, 0, Fraction(0), Fraction(1), False) assert choose([blocked, api], [1_000_000], Fraction(95,100)) == api assert api.tco([0, 100_000]) == 800_000 for fn in (lambda: api.tco([-1]), lambda: crossover(api, local, 0), lambda: choose([api], [0], Fraction(95,100)), lambda: Plan('bad', -1, 0, Fraction(0), Fraction(1))): try: fn() except ValueError: pass else: raise AssertionError('invalid input accepted') print('15 checks passed')
Observed execution using Python 3.13.5:
15 checks passedThe checks cover four horizon totals, an exact rational crossover, the no-decreasing-gap direction, low/high-volume choices, quality rejection, mandatory eligibility rejection, varying monthly demand and four malformed-input cases.
The crossover helper assumes candidate b has a lower marginal cost than candidate a. A return of None means that the cost gap does not decrease in b's favor as volume increases, not that no mathematical crossing or feasible cheaper option exists in every possible cost model. Zero means b is no more expensive at zero volume under the assumed horizon and becomes cheaper at positive volume. The function uses constant monthly volume; the TCO method instead supports a sequence of monthly volumes. The simple success fraction is an externally validated input, not a computed confidence interval or a measured outcome in this example. Eligibility represents already completed independent checks for mandatory controls and functionality; it is not a substitute for them.
The cost model does not implement tiered contracts, stepwise GPU allocation, taxes, discounting, training costs outside the supplied coefficients or probabilistic workload simulation. Use a richer accounting model for procurement. For a finite sequence of P plans and M periods, the direct implementation takes O(PM) arithmetic operations; a reusable sum of volumes could reduce repeated aggregation for this particular linear model. The test results establish the example's arithmetic behavior, not commercial feasibility.
12. Time to market and organizational capability#
Time to market affects both value and risk. A team might be able to integrate a hosted model in weeks while building an internal inference platform would take months. These estimates depend on integration, data approval, vendor procurement, evaluation, operational readiness and staff availability. A hosted API does not automatically make a product ready for production.
Consider an invented comparison in which a buy option reaches an approved pilot in one month, and a build option reaches the same stage in four months. If the expected incremental contribution of an approved operational product is $20,000 per month, the three-month delay represents a hypothetical $60,000 in foregone contribution, *if* adoption and contribution materialize and the earlier pilot is permitted to deliver that benefit. This is not realized revenue, and it should not be double counted when the full cash-flow model already includes differing launch dates.
Evaluate internal skill capacity honestly:
- Can the team operate the chosen runtime around the clock, handle dependencies and recover from failures?
- Can it maintain specialized models, safe adaptation pipelines and representative evaluation?
- Can it hire or redeploy engineers without harming higher-value product work?
- Does it have a release, security and procurement process that can meet the deadline?
Buying is attractive when a supplier provides a reliable capability that is not strategic to build. Building can be attractive when an existing platform team already has the relevant skills and reusable infrastructure. Consider incremental capacity and the opportunity cost of that team's time rather than assigning its labor a zero price because staff are already employed.
If the capability is strategically important but internal readiness is limited, a staged approach can buy an approved service initially while building the reusable application contracts, evaluation suite, data governance and operational expertise needed to reconsider later. A staged approach is valuable only if later migration is technically and contractually possible.
13. Customization and product differentiation#
Distinguish model-level customization from product-level differentiation. A product may require a custom domain vocabulary, approved sources, exact business rules, a structured output schema, low-latency classification or specialized interaction. Some can be implemented through conventional logic, retrieval, prompting or permitted adaptation without training an entire new model.
Ask where the required difference lies:
| Need | Candidate sourcing implication |
|---|---|
| Current proprietary business facts | Own authorized data and retrieval; evaluate hosted or private generation |
| Unique transaction policy | Own deterministic rule/approval service independent of model |
| Specialized predictive signal | Consider a narrow in-house model using authorized representative data |
| New supported behavior in a pretrained model | Evaluate permitted fine-tuning, adapters or a managed adaptation option |
| Specialized latency or offline deployment | Evaluate model and runtime arrangements that fit the environment |
| Standard vector/database operation | Evaluate managed service against control, cost and exit requirements |
A provider may expose fine-tuning without allowing weight export, or a self-hosted model may permit modification but not meet the quality or performance target. Verify capabilities and rights separately. A custom prompt is not durable differentiation if every competitor can reproduce it; a well-maintained domain evaluation and reliable workflow may be much harder to duplicate.
Do not use self-hosting as an excuse to build every commodity layer. Strategic control can coexist with managed infrastructure. Conversely, do not outsource the product's core authorization and policy decisions to a vendor model simply because it offers convenient tools.
14. Privacy, security and supply-chain responsibilities#
Create a data-flow and trust-boundary model for every candidate. Identify not only prompt content but also retrieved passages, generated artifacts, embeddings, telemetry, crash dumps, billing metadata, backups and human support access. Sensitive content can leak through any of these.
For a hosted service, verify the actual service and contractual tier: approved region, processor and subprocessor roles, allowed use of inputs and outputs, retention, deletion, encryption, networking, administrative access, audit evidence and breach notification. A generic assertion that a provider is compliant is insufficient for the specific data class and configuration. A privacy policy does not automatically confer all permissions needed for a particular workload.
For self-hosted serving, protect weights and software artifacts, use verified downloads and pinned dependencies, restrict network and file access, protect credentials, isolate tenants, maintain patching and vulnerability response, control privileged administration, encrypt appropriate stores and test backup/restore. Running inside a private network does not automatically make a system secure.
Managed services require shared responsibility at the actual control boundary. Establish who owns incident detection, notification, remediation and evidence. Include provider outages and changes in the threat model. Review license restrictions and export/deletion feasibility before placing governed data in a service.
Both routes require independent verification of controls and quality. The private runtime does not automatically qualify for restricted data, and the hosted route must never receive data outside its authorized scope. A private runtime outage is not permission to send restricted prompts to an external model. An unavailable route may require a safe degraded response or authorized human handling.
The NIST AI RMF, Generative AI Profile, supply-chain guidance and zero-trust architecture offer frameworks for risk and control discussions. They do not establish compliance for any product merely by being cited.
15. Reliability, support and vendor dependency#
Compare the user-visible SLO of each complete arrangement, not a provider's marketing uptime in isolation. A model API may have a contractual availability definition that excludes rate limits or particular failure conditions. The application still has authentication, retrieval, validation and network dependencies. Measure latency and availability across the full path for the representative workload.
Review:
| Risk | Mitigation or evidence |
|---|---|
| Provider capacity or quota exhaustion | Contracted limits, workload tests, admission policy and approved alternatives |
| Version retirement | Pinned model where supported, notice terms, evaluation and change plan |
| Model behavior regression | Representative regression suite and release gates |
| Regional outage | Tested recovery arrangements with compatible data constraints |
| Self-host hardware shortage | Procurement lead time, spare/failure-domain capacity and repair plan |
| Runtime or dependency vulnerability | Maintained images, verified artifacts and patch ownership |
| Supplier concentration | Map correlated dependencies; evaluate independent options |
| Support gaps | Named escalation, response commitments and internal incident owner |
Two providers may share a cloud region, network dependency or upstream model supplier; do not assume failure independence. An active fallback can add cost, privacy risk and behavioral differences. A cheaper fallback that produces unsafe or invalid results is not a reliable alternative. Specify the circumstances in which an application may abstain, queue work or use another route.
For self-hosting, redundancy must be supported by actual capacity and operations. ASD-003 explains headroom calculations; the sourcing decision must budget who provides that capacity, when it is available and how failures are addressed. Contracted service credits, if applicable, do not compensate for every lost customer outcome. Verify the real agreement and use its precise terms.
16. Vendor lock-in and reversibility#
Lock-in is the cost and risk of moving to a different arrangement. It may arise from proprietary API features, fine-tuned artifacts that cannot be exported, tokenization or prompt behavior, retrieval schemas, model-specific tool calls, private deployment configurations, data egress costs, operational skills or long commitments.
Portability is not free. Designing a full abstraction for every hypothetical provider can slow product delivery and eliminate valuable differentiated features. Instead, define stable domain-level contracts and isolate dependencies with material migration risk. Store canonical business records and necessary provenance in an exportable representation. Own a representative evaluation suite and compatible test fixtures. Document provider-specific assumptions and the plan to replace them.
At procurement time, ask for concrete exit evidence:
- Which artifacts, configurations, data and logs can be exported, in what formats and with what limits?
- Can the customer reconstruct state and source lineage elsewhere without depending on an expired service?
- What are the contractual notice periods, minimum commitments, egress charges and deletion obligations?
- What behavior is nonportable and would require rebuilding or retesting?
- What data may be used during parallel migration, and who authorizes the transition?
Estimate exit cost as a scenario, not a guaranteed expense or an arbitrary penalty. For example, an alternative with lower operating cost but $100,000 of unavoidable remaining contractual commitments may be uneconomic to switch to immediately. Existing sunk implementation costs do not by themselves justify staying; compare future avoidable and incremental costs, and distinguish unavoidable contractual payments from costs that can genuinely be eliminated.
17. Migration strategy as a sourcing option#
Migration is part of the investment case. A buyer-to-builder transition typically needs target capability evaluation, parallel capacity, compatibility testing, data/rights approval, controlled traffic transfer and retirement. An internal-to-managed transition also requires data export, responsibility changes, reconciliation, rollback and secure removal of old state.
A model migration may change generated outputs even with identical prompts. The full compatibility, provider adapter, shadow comparison and cutover implementation is covered by ASD-029. This lesson focuses on estimating the transition as a financial and operational alternative, not assuming an API rename is a complete migration.
A trial should not copy sensitive data to an unapproved service or duplicate an external business action. Shadow evaluations must use authorized inputs and suppress duplicate effects. Retain the old arrangement until the new one has met the required evidence and rollback conditions; this parallel period incurs a real cost. Avoid promising reversibility when the incumbent's contract expires before rollback can be exercised.
18. Worked hybrid sourcing case#
A fictional enterprise runs a research workspace. It wants rapid product delivery, domain-specific retrieval, and strict treatment of restricted documents.
| Layer | Illustrative decision | Reason |
|---|---|---|
| Business workflow and authority | Build internally | Product-specific permissions, review and evidence |
| Document storage and database | Buy managed service after review | Commodity durability and support, provided controls fit |
| Retrieval schema and ranking | Own logic, use managed or self-operated index | Domain-specific evidence behavior with replaceable storage |
| General language generation | Buy an approved hosted API for permitted data | Fast initial delivery and uncertain demand |
| Restricted-document processing | Evaluate approved private inference | Required data boundary may exclude external processing |
| Evaluation and monitoring contracts | Own evaluation sets and measurement | Independent quality and sourcing decisions |
| GPU runtime operation | Use managed private endpoint initially if feasible | Reduce platform burden without necessarily giving up model selection |
Suppose one million tasks/month consist of 700,000 ordinary tasks and 300,000 restricted tasks. A private route that cannot send the restricted data externally is mandatory for the latter if that is the approved policy. The hosted alternative is not a feasible substitute for those restricted tasks even if its usage price is lower.
Assume, for illustration only, the ordinary path costs $2,000 fixed plus $0.04 per ordinary task; its monthly cost is $30,000. Assume an independently sized private route costs $8,000 fixed plus $0.01 per restricted task; its monthly cost is $11,000. Combined run rate is $41,000 excluding common services, setup and any cross-route coordination. If ordinary tasks could also be served by the private route, a larger private fleet might be economically preferable, but it must be benchmarked on that mixed workload and sized for reliability. The private route's $8,000 fixed cost here is a different assumed deployment from the earlier $14,000 example; do not reuse one fleet's cost without recalculation.
The hybrid is not necessarily cheapest. Its value may be that it satisfies different mandatory processing constraints with feasible delivery times. Two operating models create extra evaluation, incident, contract and integration burden. Evaluate the complete workflow rather than celebrate provider diversity by itself.
19. Prepare the sourcing decision record#
Use a concise versioned architecture decision record rather than a spreadsheet score without evidence.
| Record field | Required content |
|---|---|
| Problem and business value | Product scope, differentiation and expected outcomes |
| Decision boundary | Model rights, inference operation, data and platform responsibilities |
| Candidate configurations | Exact versions, service tiers, hosting assumptions and contracts |
| Mandatory gates | Quality, data rights, privacy, security, reliability, delivery deadline |
| Evidence | Representative task results, workload test, control review and current quotes |
| Economic model | Horizon, volumes, fixed/variable/setup/exit costs, success denominator |
| Sensitivity | Low/base/high load, quality, price and staffing scenarios |
| Ownership | Named internal and supplier responsibilities and escalation |
| Reversibility | Data and artifact export, migration and rollback costs |
| Decision and rationale | Selected feasible alternative, rejected alternatives and reasons |
| Review triggers | Volume change, cost changes, model retirement, security or quality regression |
An optional weighted scorecard can compare *feasible* alternatives on time to value, maintainability, customization and portability. Document the weights and scoring evidence; treat uncertain values as ranges. A point total should not create false precision. If two plans have nearly identical projected TCO, sensitivity, risk and reversibility may dominate the decision.
Suggested approval process: product owner confirms task and benefit, engineering validates workload and integrations, security/privacy and legal reviewers assess the actual controls and terms, finance validates comparable TCO and commitments, and the accountable release owner approves the permitted launch scope. Each material assumption should have a named owner and a re-evaluation trigger.
20. Production monitoring and triggers to revisit#
Sourcing is an ongoing architecture decision. Compare actual usage, cost and task success with the approved model.
- Track total cost and cost per successful task, not just provider spend.
- Record usage mix, output length, retry, human review and fallback consumption.
- Monitor capacity, utilization, quota rejects, service SLOs and incident recovery.
- Track model and runtime versions, regression results, security updates and license changes.
- Reconcile invoices with metered work and contracted rates.
- Reassess when demand crosses a validated economic or capacity boundary, a supplier changes terms, a key capability becomes unsupported, or internal staffing changes.
A crossing in a forecast is a trigger to reassess, not an automatic migration command. Check whether the new volume is sustainable, whether the required larger deployment remains feasible, whether savings exceed switching costs, and whether contractual obligations have changed. A surprise provider bill might indicate duplicated work or uncontrolled output lengths rather than a fundamentally bad sourcing decision. Diagnose the workload before changing architecture.
21. Common mistakes and trade-offs#
| Mistake | Better approach |
|---|---|
| Assume buy means no engineering | Budget integration, evaluation, policy, support and incidents |
| Assume open weights are unrestricted | Review actual rights of model, data, runtime and derivatives |
| Treat self-hosting as zero marginal cost | Account for fleet, energy, utilization, operations and capacity steps |
| Compare raw tokens rather than outcomes | Use equivalent tasks, quality and latency gates |
| Ignore one-time migration and exit | Include dual-run, retraining, export and termination costs |
| Compare current hosted bill with hypothetical fully utilized GPUs | Model real demand, idle capacity, headroom and failure domains |
| Treat managed infrastructure as automatic compliance | Verify shared-responsibility controls and actual contracts |
| Choose a provider solely for best benchmark | Test representative product workloads and risk boundaries |
| Build infrastructure because it is interesting | Tie internal ownership to measurable strategic or mandatory needs |
| Make all vendor features interchangeable in advance | Isolate material dependencies, balance portability cost and product value |
| Assume fallback can receive the same data | Enforce route-specific permission and quality independently |
| Ignore time to market | Compare cash-flow timing and opportunity cost without double counting |
A build decision provides more control only when the organization can exercise that control competently. A buy decision reduces some operational burden only when the provider actually accepts the relevant responsibility and meets its contract. A hybrid decision adds boundaries and therefore demands explicit integration and ownership.
22. Interview-ready answer#
I would first establish the product requirements, non-negotiable controls, expected workload, timeline and sources of differentiation. I would break the architecture into model ownership and adaptation, inference runtime, data services, platform and business workflow, then compare hosted, managed, licensed/self-hosted and internally developed alternatives at each boundary.
I would eliminate candidates that fail quality, data rights, licensing, privacy, security, operational reliability or functional gates. For the feasible options I would measure equivalent successful user tasks, estimate full TCO over the same horizon including setup, staff, idle capacity, usage, review, incidents and exit, and calculate break-even volume and payback with sensitivity to real demand and capacity steps. I would include time to market and opportunity cost without double counting.
I would buy commodity capabilities when the provider meets the contract and preserves an acceptable risk profile, and build or retain control of capabilities that genuinely differentiate the product or require unavailable controls. I would often choose a hybrid, with owned business policy, evaluation and data governance combined with approved model and infrastructure services. Finally I would document operational ownership, supplier concentration, license and data constraints, migration economics, rollback and review triggers. The decision is evidence-based and reversible where possible, not ideological.
References and research transparency#
The authorized offline research exception was applied. The references identify established primary research, official standards, documentation and risk/operations frameworks. Current content, URL availability, licensing terms, provider pricing and the current Supabase changelog could not be live-verified. The three diagrams use standard triple-backtick Mermaid fences and were reviewed structurally; parser execution and live site rendering were not verified. The standard-library financial implementation was executed locally using Python 3.13.5 with all 15 checks passing. No model benchmarking, provider contract review, financial audit or procurement recommendation for an actual deployment was performed. All financial and workload examples are fictional.
- NIST — AI Risk Management Framework 1.0
- NIST — Artificial Intelligence Risk Management Framework: Generative AI Profile
- NIST SP 800-161 Rev. 1 — Cybersecurity Supply Chain Risk Management Practices
- Open Source Initiative — Open Source AI Definition
- SPDX — License List
- Sculley et al. — Hidden Technical Debt in Machine Learning Systems
- Google SRE Workbook — Implementing SLOs
- FinOps Foundation — FinOps Framework
- MLCommons — Inference Benchmarks
- Kwon et al. — Efficient Memory Management for Large Language Model Serving with PagedAttention
- AWS — Shared Responsibility Model
- NIST SP 800-207 — Zero Trust Architecture
References
- 1.
- 2.
- 3.
- 4.Open Source Initiative — Open Source AI Definitionopensource.org
- 5.SPDX — License Listspdx.org
- 6.
- 7.Google SRE Workbook — Implementing SLOssre.google
- 8.FinOps Foundation — FinOps Frameworkfinops.org
- 9.MLCommons — Inference Benchmarksmlcommons.org
- 10.
- 11.AWS — Shared Responsibility Modelaws.amazon.com
- 12.
Related questions
Explore other topics:Forward Deployed EngineeringMachine LearningMLOpsPython