How AI coding agents pick a model — and what BYOK changes

When you hand an AI coding agent a task, something decides which model runs it and whose account pays for the tokens. Here's the actual routing — bring-your-own-key direct vs platform-paid fallback — for Claude, GPT, and Codex, and how to pick the path that fits how much you build.

By Brian Boisjoli 4 min read byokai-agentsmodels

The decision you don't see

Every time you give an AI coding agent a task — "add Stripe checkout", "fix the 500 on /api/users" — something behind the scenes decides two things: which model runs the task, and whose account pays for the tokens. Most platforms hide this completely. You pick a plan, tasks happen, a number goes down somewhere.

That opacity is fine right up until it isn't — when the bill surprises you, when you hit a credit cliff mid-build, or when you want to use the Claude subscription you're already paying for and the platform won't let you. So this post pulls the curtain back on how the routing actually works, using the two paths every serious agent platform has to choose between.

I build VibeKit, a coding-agent platform, so I'll use our routing as the worked example — but the mechanics are the same anywhere bring-your-own-key is on the table.

Two paths: bring-your-own-key vs platform-paid

There are really only two ways a model call can happen:

1. Bring-your-own-key (BYOK). You paste in your own Anthropic or OpenAI key. The agent calls that provider directly with your key. The platform never touches the bill — it's your key, your account, your invoice, at provider list price with no markup. If you already pay Anthropic or OpenAI, this is just... using what you already pay for.

2. Platform-paid (no key). You don't bring a key, so the platform fronts the model cost out of its provider account and charges you for it — usually as credits or a bundled subscription. This is the default on most builders, and it's where the "ran out of credits in an afternoon" stories come from.

The interesting part is what each path implies for which model you can run and what it costs.

What BYOK actually covers (and what it doesn't)

BYOK sounds universal but it isn't — a model is only BYOK-able if the provider sells you a direct credential for it. In practice that's:

What's not BYOK: anything where there's no direct consumer credential to bring. For those you're on the platform-paid path by definition.

The honest tradeoff: BYOK gives you list-price cost and zero lock-in, but you manage a key. Platform-paid means zero setup, but you pay the platform's price and you live inside its credit model.

The cost math, briefly

This is the part people get wrong by arguing in the abstract, so here's the shape of it (I did the full per-task breakdown in BYOK vs platform-paid: the real cost of 1,000 features):

The breakeven is sharper than most people expect. If you're a hobbyist, don't sweat BYOK. If coding agents are part of your daily workflow, BYOK is the difference between a predictable provider invoice and a credit meter you babysit.

Where the free tier fits

There's also a third, quieter option: a free tier that routes to a rotating pool of open models at no cost. It won't match frontier Claude or GPT on a hard refactor, but for "spin up a landing page" or "draft this CRUD endpoint" it's genuinely enough — and $0 is a hard price to beat for trying the workflow before you commit a key or credits.

How to pick (a 10-second guide)

The thing nobody tells you: picking the model is downstream of picking the path. Decide whose account pays first, and the model question mostly answers itself.

How VibeKit does it

Concretely, on VibeKit: if you've added a key, every call goes direct on that key with no markup. If you haven't, you pick a provider and we front it — at a transparent markup, not a hidden one — or you stay on the free tier at $0. You can flip between paths per app, and your apps are real GitHub repos you own either way, so nothing's locked in if you decide to take your key and walk.

That's the whole point of being explicit about routing: the path should be your choice, made on cost and lock-in — not a default you discover on the invoice.

Try it on the free tier · Bring your own Claude key · See the cost math

Try VibeKit
Every app gets its own AI agent. Free tier with BYOK.
Start Building →