The bridge controls a CommandCode account API key. Any caller who can access it can spend credits and send arbitrary prompts to the upstream model.
- Default bind host:
127.0.0.1. - Optional
BRIDGE_API_KEYaccepted throughAuthorization: Bearerorx-api-key. - Rate limiting via
@fastify/rate-limit. - Request body size limit.
- Model allowlist enabled by default.
- No local shell/file tools are exposed to upstream by default.
- Logs redact common secret-bearing headers.
PUT /admin/configandPOST /admin/restartrequire the current runtimeBRIDGE_API_KEYwhenever one is configured.Origin,Referer, andHostare not authentication credentials. CORS checks remain browser controls only.- A keyless runtime may bootstrap through the dashboard only when both the TCP peer address and HTTP Host are loopback. This preserves default local installs while blocking LAN and DNS-rebinding takeover.
- Existing users opening a fresh browser enter the current key once in Current Admin API Key. Key rotation continues to authenticate with the old key until restart activates the new key.
- Generated keys contain 24 random bytes. Existing keys are never rotated automatically during upgrade.
PUT /admin/configandPOST /admin/restartrequire the current runtimeBRIDGE_API_KEYwhenever one is configured.Origin,Referer, andHostare not authentication credentials. CORS checks remain browser controls only.- A keyless runtime may bootstrap through the dashboard only when both the TCP peer address and HTTP Host are loopback. This preserves default local installs while blocking LAN and DNS-rebinding takeover.
- Existing users opening a fresh browser enter the current key once in Current Admin API Key. Key rotation continues to authenticate with the old key until restart activates the new key.
- Generated keys contain 24 random bytes. Existing keys are never rotated automatically during upgrade.
Use one of:
127.0.0.1only for local clients.- Tailscale/VPN bind with
BRIDGE_API_KEYset. - Reverse proxy with TLS and authentication.
Do not run as a public anonymous endpoint.