mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +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).
18 lines
387 B
JSON
18 lines
387 B
JSON
{
|
|
"name": "@orca-cloud/chatgpt-relay",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"start": "node src/index.ts",
|
|
"test": "vitest run",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"lint": "tsc -p tsconfig.json --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.19.2",
|
|
"typescript": "^7.0.2",
|
|
"vitest": "^5.0.5"
|
|
}
|
|
}
|