one openrouter key, any model your team can run

one openrouter key, any model your team can run


openrouter is now a first-class bring-your-own-model provider for the claude code runtime on 5dive. one key, and you pick which model each agent runs, then swap it live without rebuilding anything around it. yesterday we argued the model should be a setting. this is the setting.

what shipped

you spin up a claude-type agent, point it at openrouter with your own key, and name the model:

sudo 5dive agent create glm-coder --type=claude --provider=openrouter --api-key=<key> --auth-profile=openrouter --model=z-ai/glm-5.2

--model takes any concrete slug openrouter serves. anthropic/*, openai/*, google/*, meta-llama/*, deepseek/*, z-ai/*, the full list is on openrouter’s models page. omit it and the agent runs claude through that same key by default. yes, anthropic’s own models included. one key is your claude access and your everything-else access at once.

(prefer to keep the key out of your shell history? pass --api-key=- and pipe it: echo -n '<key>' | sudo 5dive agent create ... --api-key=-.)

change your mind later? switch the model on a running agent and it sticks across restarts:

sudo 5dive agent config glm-coder set model=z-ai/glm-5.2

or flip it mid-conversation with claude code’s built-in /model <slug>, session-scoped, no restart. the wizard offers openrouter too if you’d rather not touch the flags.

the “one key” part is the point

byo-model already worked. you could point an agent at z.ai for glm, at deepseek, at moonshot for kimi. but each one was its own integration and its own key. want three different models across your team? three provider setups.

openrouter collapses that. one key, and the whole shelf is addressable by slug. and the shelf includes anthropic’s own models, so this isn’t an open-model aggregator you bolt on next to your claude setup. it’s one key for both. the same profile that runs glm runs the claude family at full tool-calling fidelity, you just name a different slug:

sudo 5dive agent create claude-coder --type=claude --provider=openrouter --api-key=<key> --auth-profile=openrouter --model=anthropic/claude-sonnet-5

run opus, sonnet and haiku that way, and swap any agent to glm or deepseek by changing one slug. same key.

no proxy shim in the middle either. openrouter ships a native anthropic-skin endpoint, so the harness talks to it directly and passes the model name through, translating other families into anthropic’s wire format on the way.

pick the model per agent, not per company

this is where it stops being a party trick. an agent on 5dive isn’t a chat window, it’s a role on an org chart with its own memory, skills, and jobs. so the model is a per-role decision now.

put opus on the agent that architects. put a cheaper claude on the one that triages inbound or runs the same cron scrape every hour. try an open model on a role that’s mostly generation. same team, same wiring, different engines under each seat. and when next week’s model shows up, you change a slug, not a stack.

one thing to be deliberate about: what each role leans on. claude code speaks anthropic’s tool-calling conventions natively, so the claude family runs at full fidelity on the tool-heavy agentic work, long edit loops, sub-agents, tight tool chains. that’s the roles you don’t want getting flaky.

the honest caveats

byo-model is the advanced path and we’re not going to pretend it’s free of edges:

  • open models run, but the seam is tool-calling. openrouter translates other families into anthropic’s tool conventions, and that translation isn’t perfect. glm, deepseek, kimi and friends will run, but on tool-heavy agentic work the translation can stall a call, malform an edit, or drop a sub-agent. reach for an open model where raw generation carries the task, keep the claude family on the roles that lean hard on tools.
  • the defaults are sane on purpose. leave --model off and every tier resolves to a real claude slug, so a fresh openrouter agent works out of the box before you start swapping.
  • it’s byo, on your box, your key. the provider relationship, the billing, and the terms are yours. it also means it lives at the mercy of both sides’ terms. best-effort, eyes open.

the takeaway

the models are going to keep leapfrogging each other, and that’s fine. the mistake is building a team of agents where every leapfrog is a migration. one openrouter key makes the engine the swappable part and leaves everything you actually built, the memory, the skills, the org chart, sitting still.

try it: spin up an agent on 5dive, give it a job, then swap the model under it with one command and watch nothing else move.

5dive is open source (MIT). the whole thing is on github if you’d rather read the code or self-host it.