mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-10 20:39:59 +00:00
Root cause of 'no tokens found in header' after browser OAuth: The Fly.io CLI Sessions API returns raw macaroon tokens (e.g. m2.XXXX) WITHOUT the 'FlyV1 ' prefix. _sanitize_fly_token only handled fm2_ tokens, so m2. tokens fell through unchanged and were sent as: Authorization: Bearer m2.XXXX Fly.io's Machines API expects FlyV1 macaroon format, not Bearer. Fixes: - _sanitize_fly_token: add m2.* case that wraps as 'FlyV1 m2.XXX' - _try_fly_browser_auth polling: eagerly wrap any non-FlyV1 token with 'FlyV1 ' prefix at the source, before it's echoed back to the caller Token format handling after fix: m2.XXXX → FlyV1 m2.XXXX ← CLI Sessions API (was broken) fm2_XXXX → FlyV1 fm2_XXXX ← still handled (unchanged) FlyV1 fm2_XXXX → FlyV1 fm2_XXXX ← already correct (unchanged) eyJhbGci... → Bearer eyJ... ← legacy JWT (fallback to manual) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| lib | ||
| claude.sh | ||
| codex.sh | ||
| kilocode.sh | ||
| openclaw.sh | ||
| opencode.sh | ||
| README.md | ||
| zeroclaw.sh | ||
Fly.io
Fly.io Machines via REST API and flyctl CLI. Fly.io
Agents
Claude Code
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/claude.sh)
OpenClaw
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/openclaw.sh)
ZeroClaw
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/zeroclaw.sh)
Codex CLI
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/codex.sh)
OpenCode
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/opencode.sh)
Kilo Code
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/kilocode.sh)
Non-Interactive Mode
FLY_APP_NAME=dev-mk1 \
FLY_API_TOKEN=your-token \
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/claude.sh)
Environment Variables
| Variable | Description | Default |
|---|---|---|
FLY_API_TOKEN |
Fly.io API token | (prompted or from flyctl auth) |
FLY_APP_NAME |
App name | (prompted) |
FLY_REGION |
Deployment region | iad |
FLY_VM_SIZE |
VM size | shared-cpu-1x |
FLY_VM_MEMORY |
VM memory (MB) | 1024 |
FLY_ORG |
Organization slug | personal |
OPENROUTER_API_KEY |
OpenRouter API key | (OAuth or prompted) |