mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 19:34:29 +00:00
chatgpt.com answers Cloudflare Workers' egress with a 403 "Unable to load site" page, so Codex via the Orca account could never get an answer through the egress proxy (#767 made that a printed error). Cloud Run's egress is answered normally (probed, then deleted). - cloud/apps/chatgpt-relay: a dependency-free Node relay. chatgpt.com only, the same Codex path pinning as the Worker (shared sandbox-control/src/codex-paths.ts), SSE streamed chunk by chunk, no WebSocket upgrades, hop and Cloud Run headers dropped, logs without headers, bodies or queries. - Cloud Run IAM authenticates the Worker: one invoker service account (run.invoker on the relay only); the Worker mints a Google ID token for the relay URL and sends it in X-Serverless-Authorization, so the swapped ChatGPT Authorization passes through untouched. - sandbox-control: CHATGPT_RELAY_URL + CHATGPT_RELAY_SERVICE_ACCOUNT route the egress proxy's chatgpt.com fetches through the relay; unset, chatgpt.com goes direct as before. A relay sign-in failure answers Codex a 503 JSON detail instead of reaching chatgpt.com. - cloud/infra/chatgpt-relay: Terraform (staging backend applied; production is a runbook step).