Skip to content

v0.15.0 — Per-session LLM gateway routing

Choose a tag to compare

@lacion lacion released this 20 Jul 20:23
073e352

Point a session at CLIProxyAPI, a corporate gateway, or anything else that speaks the Anthropic wire format — one session at a time, visible on the board, with the credential never leaving your machine.

Setting ANTHROPIC_BASE_URL machine-wide in ~/.claude/settings.json already worked. What this adds is the per-session choice, which that can't express: a fleet can run some agents through a proxy and send the rest straight to Anthropic.

Getting started

Hit set up next to 🛰 gateway on the Spawn form. For a stock CLIProxyAPI that's http://127.0.0.1:8317 with any entry from its api-keys: list, bearer style. Then tick 🛰 route through … on any spawn — gateway-routed cards carry a 🛰 chip.

Setting What it is
gateway_base_url Where the gateway lives. http:// and https:// only, and no credentials in the URL.
gateway_token The credential. Never served back to any client.
gateway_auth_style bearer (default) sends Authorization: Bearer …; api-key sends x-api-key. If you get a 401, it's almost always this.
gateway_model_discovery On by default. Surfaces gateway-only model names in /model.
gateway_default Off by default. When on, a spawn that says nothing routes through the gateway.

A revive inherits its lineage's routing and deliberately does not re-consult gateway_default — resuming a conversation against a different provider than the one that wrote its transcript changes who is billed with nothing on screen saying so.

⚠️ Breaking: ambient ANTHROPIC_API_KEY

Board-spawned panes no longer inherit ANTHROPIC_* from the daemon's environment. If you authenticate Claude Code with an ANTHROPIC_API_KEY exported in your shell, board-spawned panes will stop seeing it. Sessions you start yourself are unaffected. Move it to ~/.claude/settings.json, which Claude Code reads for itself and Fleet Deck never touches:

{ "env": { "ANTHROPIC_API_KEY": "sk-ant-…" } }

That inheritance is what this release removes, and it was a real leak: exporting a gateway once, in whichever terminal happened to trigger SessionStart, baked it into the tmux server's global environment — so every board-spawned session on the machine quietly routed through it for as long as that server lived.

Security

  • The credential never leaves the daemon. The settings view serves token_set: true and nothing more, because /state is broadcast to every connected board — phones on LAN mode included. It reaches the pane through tmux's own environment (new-window -e) rather than an env NAME=secret argv, so it stays out of ps for the pane's whole life.
  • gateway_base_url refuses embedded credentials. It's deliberately not masked — seeing where a session is going is the point — which is exactly why user:pass@host, ?api_key=… and fragments are rejected. new URL().href preserves all three, so normalizing wouldn't have caught them.

Also

Remote control and the gateway are refused together, naming the cause. That isn't a Fleet Deck policy: Claude Code disables Remote Control whenever ANTHROPIC_BASE_URL points at a non-Anthropic host, so accepting both would hand back a spawn whose 📱 link never appears and whose failure has nothing to point at. The form greys out whichever you didn't pick.

A half-configured gateway (a URL with no token, or the reverse) fails the spawn rather than quietly falling through to Anthropic.


Full changelog: v0.14.0...v0.15.0