PayCargo · AI Infrastructure Memo

The model router as the strategic moat

From: Mike Tang
To: Mike Lewis (for v7 review and onward distribution)
Re: Why the substrate decision we are about to make is the AI strategy
Date: 2026-06
Status: Pre-decision. Companion to Step 6.l (golden-spec cartridge) and Step 6.m (substrate doctrine).

TL;DR

1. What is on the table

The AI-sandbox account is shipping its third cartridge (code-agents, with golden-spec as the first agent). Each agent makes 4 Bedrock calls per invocation: three cheap "scout" turns that pick which repository files matter for a given GitHub issue, and one expensive "writer" turn that produces the actual specification.

We can either hardcode model IDs in the cartridge, the way every vibe-coded AI startup does, or we can put a small substrate primitive between the cartridge and the model: the model router. The cartridge says "I need a scout model" or "I need a writer model." The router decides which actual backend serves that role. The decision lives in a JSON manifest the operator edits, not in cartridge code.

That single decision is the topic of this memo, because of what it sets up.

2. The immediate cost story

Five concrete strategies for the golden-spec agent, ordered by per-spec cost. Numbers assume ~10K input tokens of issue context, ~25K tokens of repository file content, ~4K tokens of generated spec, at published Bedrock pricing.

Strategy Scout backend Writer backend Per spec 50 specs/day
A. Naive single-vendor Opus 4.6 Opus 4.6 $0.87 $1,305/mo
B. Cloud-only tiered Haiku 4.5 Opus 4.6 $0.87 $1,305/mo
C. Cloud-only, aggressive selectivity Haiku 4.5 × multiple turns Opus 4.6 (narrow input) $0.48 $720/mo
D. Mac Mini scout + Opus writer Local (free) Opus 4.6 (narrow input) $0.48 $720/mo
E. Mac Mini scout + Sonnet writer Local (free) Sonnet 4.5 $0.10 $150/mo

Strategy E is roughly 90% cheaper than the obvious single-vendor design. Strategy D keeps Opus quality at the writer turn for prestige work. The point is not which row to pick. The point is that the router lets the operator pick row D for executive-facing artifacts and row E for routine work, on the same agent, by editing a config. No deploy. No code change.

Every competitor we are aware of has written new BedrockRuntimeClient() directly in their Lambda. Their cost structure is row A. Their migration path to row E is a multi-week refactor across every agent. Ours is a JSON edit.

3. The trajectory that compounds

Today's savings are pleasant. The strategic story is what these savings turn into over time, because two trends are running in our favor at the same time.

Bedrock pricing is rising. Anthropic has 4.5, 4.6, 4.7 in the pipeline; each more expensive than the last. Their pricing power is real because the frontier keeps moving.

Open-source quality is rising while cost falls toward electricity. Qwen Coder 2.5 at 14B is genuinely capable today. Qwen Coder 3 at 70B will land on Mac Studio hardware in months. DeepSeek Coder V3 is targeting Sonnet-3.5-class quality. The Mac Studio with 192GB unified memory is a $5K piece of hardware that runs models that would have been hosted-only a year earlier.

The router captures every step of the gap widening, automatically, route table edit at a time.

Phase Local handles Cloud is for Cost per spec
Phase 1.5 (this quarter) Scout turns. Navigation. Cheap thinking. Writer turn. Opus or Sonnet. $0.10 to $0.48
Phase 2 (6-12 months) Most writer turns for routine work. Sonnet-3.5-class quality on coding tasks runs local. Novel architectural problems. The escalation tier. $0.05 to $0.10
Phase 3 (1-2 years) Nearly all PayCargo agent work. Frontier open-source approaches Opus-class on coding. Verification and genuinely hard problems. Near zero

The cost story is meaningful. The competitive story is the moat.

4. Why this is a moat, not just an optimization

Unit economics compound in our favor

Competitors who built on hosted-only Bedrock can match velocity for now. They cannot match unit economics once open-source crosses the quality threshold for the bulk of agent work. Their cost is locked to Anthropic's pricing power. Ours is locked to electricity. Five years out the gap is plausibly 10x to 100x at scale. A competitor at that point either sacrifices margin to match price or sacrifices price to match margin. Substrate compounds. Bolt-on features do not.

This is the same doctrine that wins in payments. CargoSprint optimizes the surface; we harden the substrate. The damage in fintech, as we have argued elsewhere, is irreversible. Same logic applies to AI infrastructure: a competitor who shipped Lambdas that hard-bind to Anthropic IDs in 2025 inherits Anthropic's pricing forever or rewrites their stack. We just edit JSON.

Sovereignty becomes structural, not promised

Scout turns process raw customer code, configuration, possibly customer names embedded in issue bodies. Today every byte of that goes to Anthropic. Once the router is in place and the Mac Mini is wired, the scout turns never leave the perimeter. As Phase 2 lands, the writer goes local for routine work. By Phase 3 nearly nothing transits a third-party API.

PayCargo's compliance posture moves from "we promise we redact PII before sending to OpenAI" (every competitor) to "no customer architecture decision ever transited a third-party API" (only us). That is structurally true, auditable from CloudTrail, and impossible for a competitor to copy without a stack rewrite. It is also a sellable position to financial regulators who are about to start asking these questions on AI.

New model classes plug in instantly

Every quarter the model market reshuffles. Specialist tiny models, regional sovereignty-required models, partner-trained domain models. Today they are noise. Five years from now several of them will matter. The router lets us evaluate each in a route entry and use whichever wins for the specific role, without touching cartridge code. We do not have to pick winners. We stay optionable.

Asymmetric switching cost is the most durable moat

The lock-in we build into our own infrastructure is the inverse of vendor lock-in: we have low switching cost to any backend, and our infrastructure becomes increasingly cheap to operate. Competitors who skipped this substrate decision inherit high switching cost to any backend, and their infrastructure becomes increasingly expensive to operate. The asymmetry compounds without us having to do anything beyond the initial substrate work.

5. What this commits PayCargo to

  1. One week of substrate work. Small Terraform module, shared client library, SSM route table, obs UI selector. Already specced in Step 6.m. Negligible deploy risk.
  2. No raw Bedrock clients in any cartridge. Code review enforces. Easy rule.
  3. A Mac Mini or Mac Studio at the office with Tailscale, Ollama, Qwen 2.5 Coder. ~$2K hardware. Already partially in place per Mike's comment.
  4. Operator ownership of route tables. Engineers ship the abstraction; operators tune routes. The obs Cartridges tab already has the surface to host the editor.
  5. Documenting the trajectory publicly in our own engineering doctrine series (Step 6.m is the substrate doc; this memo is the strategy doc). When external developers and prospective hires read our doctrine series, they see we are betting on substrate over surface area, on optionality over speed, on doctrine over duct tape. That is a hiring magnet for the engineers we actually want.

6. What this does not commit PayCargo to

7. Recommendation

Ship code-agents (golden-spec) on cloud-only routes in the next sprint to prove the cartridge model end-to-end. Add the model router substrate the sprint after that, with Mac Mini wired in as the scout backend. Demo the cost flip on the obs dashboard at the executive review.

The substrate work is small enough to be invisible to anyone reviewing for velocity. The cost story and the moat story are big enough to be the centerpiece of any AI-strategy conversation with the board, with regulators, with the customers who care about where their data goes.

Worth doing. Worth doing now, before the rest of the cartridges land and the migration cost goes up. Worth packaging into a presentation for Eduardo whenever the timing is right.

Companion documents in the obs Documentation tab: