{"_id":"@bacnh85/pi-chatgpt-web","_rev":"2-af8a983bcae0741b4223a9223484ac90","name":"@bacnh85/pi-chatgpt-web","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@bacnh85/pi-chatgpt-web","version":"0.2.0","keywords":["pi","pi-extension","chatgpt","chatgpt-web","chatgpt2api","openai-compatible","web2api"],"license":"MIT","_id":"@bacnh85/pi-chatgpt-web@0.2.0","maintainers":[{"name":"bacnh85","email":"mail@bacnh.com"}],"homepage":"https://github.com/bacnh85/pi-extensions/tree/main/pi-chatgpt-web","bugs":{"url":"https://github.com/bacnh85/pi-extensions/issues"},"pi":{"extensions":["./extensions/index.ts"]},"dist":{"shasum":"a0f5d6bc86f0a63c80efffc8828b5da30184d21d","tarball":"https://registry.npmjs.org/@bacnh85/pi-chatgpt-web/-/pi-chatgpt-web-0.2.0.tgz","fileCount":8,"integrity":"sha512-+dnqX7TfC0dhn5A8RnJM52ddlGuvT9uSY/Iz/ni+9iBYTP7/F2ibwDuiF+0eb7H3JyJ9ja3kOH1rraF8rmrY/w==","signatures":[{"sig":"MEYCIQDm08RdNLoxgLwAHpiF1945lDSIG7iLul8Pkugd21hIwQIhAKhZZmBb3VpZE3LwA+/3VnwJX5J39vrbcF8pOzFEndnN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40504},"type":"module","gitHead":"c4708e199ffd5e6a2ef5edffaeb4d047e61dd6a3","scripts":{"test":"node --import tsx --test extensions/test/unit.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"bacnh85","email":"mail@bacnh.com"},"repository":{"url":"git+https://github.com/bacnh85/pi-extensions.git","type":"git","directory":"pi-chatgpt-web"},"_npmVersion":"10.9.8","description":"Pi extension that turns a self-hosted ChatGPT-web bridge (OpenAI-compatible, e.g. basketikun/chatgpt2api) into a Pi provider for free web-tier models.","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","typescript":"^5.9.3","@types/node":"^20.19.43"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-chatgpt-web_0.2.0_1787715598663_0.134471427984737","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bacnh85/pi-chatgpt-web","version":"0.2.1","description":"Pi extension that turns a self-hosted ChatGPT-web bridge (OpenAI-compatible, e.g. basketikun/chatgpt2api) into a Pi provider for free web-tier models.","type":"module","license":"MIT","publishConfig":{"access":"public"},"homepage":"https://github.com/bacnh85/pi-extensions/tree/main/pi-chatgpt-web","repository":{"type":"git","url":"git+https://github.com/bacnh85/pi-extensions.git","directory":"pi-chatgpt-web"},"bugs":{"url":"https://github.com/bacnh85/pi-extensions/issues"},"keywords":["pi","pi-extension","chatgpt","chatgpt-web","chatgpt2api","openai-compatible","web2api"],"scripts":{"test":"node --import tsx --test extensions/test/unit.test.ts","typecheck":"tsc --noEmit"},"pi":{"extensions":["./extensions/index.ts"],"skills":["./skills"]},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"devDependencies":{"@types/node":"^20.19.43","tsx":"^4.23.1","typescript":"^5.9.3"},"_id":"@bacnh85/pi-chatgpt-web@0.2.1","gitHead":"fc25702c6bed994da1dd5071c5ec8071bfd28393","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-SbxZFsi/wTaS0w2KxJDt+gPUqpnhRsROZCCGeYWBosaJnM/yAL8Rop9+FscLsZzKaeorTyxiCiKvL1cmDCRC/w==","shasum":"4b31f99b9daf6620f83a646068256a942989979d","tarball":"https://registry.npmjs.org/@bacnh85/pi-chatgpt-web/-/pi-chatgpt-web-0.2.1.tgz","fileCount":9,"unpackedSize":44439,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBwJk9PWjsg5rX+2/vM3dcH4RJWYy12/aOlwvrhSJizDAiBM2wEHo5uMKjp2WakQxEhhZQ0oit5S5+1ji8FrUQgtig=="}]},"_npmUser":{"name":"bacnh85","email":"mail@bacnh.com"},"directories":{},"maintainers":[{"name":"bacnh85","email":"mail@bacnh.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-chatgpt-web_0.2.1_1789204280405_0.7701294802307883"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T03:39:58.522Z","modified":"2026-09-12T09:11:20.655Z","0.2.0":"2026-08-26T03:39:58.793Z","0.2.1":"2026-09-12T09:11:20.532Z"},"bugs":{"url":"https://github.com/bacnh85/pi-extensions/issues"},"license":"MIT","homepage":"https://github.com/bacnh85/pi-extensions/tree/main/pi-chatgpt-web","keywords":["pi","pi-extension","chatgpt","chatgpt-web","chatgpt2api","openai-compatible","web2api"],"repository":{"type":"git","url":"git+https://github.com/bacnh85/pi-extensions.git","directory":"pi-chatgpt-web"},"description":"Pi extension that turns a self-hosted ChatGPT-web bridge (OpenAI-compatible, e.g. basketikun/chatgpt2api) into a Pi provider for free web-tier models.","maintainers":[{"name":"bacnh85","email":"mail@bacnh.com"}],"readme":"# pi-chatgpt-web\n\nTurn a self-hosted **ChatGPT web bridge** (OpenAI-compatible reverse proxy for\nchatgpt.com, e.g. [basketikun/chatgpt2api](https://github.com/basketikun/chatgpt2api))\ninto a first-class Pi provider. Free web-tier models (`gpt-5-5`, `gpt-5-6`,\n`gpt-5-6-mini`, …) become selectable via `/model` like any other model —\nno ChatGPT Plus/Pro subscription, no OpenAI API billing.\n\n```\nPi ── openai-completions ──► self-hosted web bridge (docker) ──► chatgpt.com web backend\n```\n\nThe extension is **bridge-agnostic**: any OpenAI-compatible web2api endpoint\nworks. The default targets the homelab chatgpt2api deployment\n(`http://172.30.55.22:3001/v1`), managed by the homelab-playbook / pi-s2.\n\n## Install\n\n```jsonc\n// ~/.pi/agent/settings.json\n{\n  \"packages\": [\"@bacnh85/pi-chatgpt-web\"]\n}\n```\n\n## Configure\n\nSet the auth key once (the bridge's `auth-key`, from your deployment secrets):\n\n```bash\n# ~/.pi/agent/.env.local (or any env source)\nCHATGPT_WEB_AUTH_KEY=your-bridge-auth-key\n# Optional — override the endpoint (must include /v1):\n# CHATGPT_WEB_BASE_URL=http://172.30.55.22:3001/v1\n```\n\nOr interactively: `/login-chatgpt-web` (prompts for URL + key, tests the\nconnection, saves to `~/.pi/agent/chatgpt-web-config.json`).\n\nResolution order: `CHATGPT_WEB_BASE_URL` / `CHATGPT_WEB_AUTH_KEY` env vars →\nsaved config → default `http://172.30.55.22:3001/v1`.\n\n⚠️ The bridge `baseUrl` **must include `/v1`** — Pi appends `/chat/completions`\nverbatim (missing the version segment causes 404s).\n\n## Use\n\n```\n/chatgpt-web-status    # bridge reachability, model count, account pool health\n/chatgpt-web-model     # search + select a model\n/model                 # Pi built-in picker: chatgpt-web/gpt-5-5-mini, …\n```\n\n## Chat-only limitation (important)\n\nThe bridge routes text models through chatgpt.com's **web conversation API**,\nwhich has **no function calling** — verified live: `tools` on\n`/v1/chat/completions` and even forced `tool_choice` on `/v1/responses` are\nsilently ignored. Every chatgpt-web model is therefore **chat-only**:\n\n- ✅ Ask questions, analysis, drafting, explanations\n- ❌ File access, shell, edits, subagents — no tool of any kind\n\nModel names carry a `(chat only)` suffix so this is visible in `/model`.\nUse a tool-capable provider (or the Codex backend via a Codex-proxy) for\nagentic work.\n\n## codex-web — agentic (tool-capable) ChatGPT access\n\nThe sibling provider **`codex-web`** in this same package routes through the\nhomelab-deployed [icebear0828/codex-proxy](https://github.com/icebear0828/codex-proxy)\n(`http://172.30.55.22:8086/v1`), which proxies chatgpt.com's **Codex backend**\nwith native function calling — file access, shell, edits all work. Use this\nfor real coding sessions; use `chatgpt-web` for free-form chat.\n\n```bash\n# ~/.pi/agent/.env.local\nCODEX_WEB_AUTH_KEY=<vault_codex_proxy_api_key>\n```\n\nOne-time setup: open `http://172.30.55.22:8086` in a browser and complete the\nOAuth PKCE login with a ChatGPT account (free account works). Accounts persist\nin the proxy's `data/` volume.\n\n```\n/login-codex-web      # configure URL + key\n/codex-web-status     # proxy reachability + model catalog\n/codex-web-model      # search and select\n/model                # codex-web/gpt-5.4, codex-web/gpt-5.5, …\n```\n\nModels (live from the proxy, 2026-08-20): `gpt-5.6-terra` (272k/872k max),\n`gpt-5.6-luna`, `gpt-5.5`, `gpt-5.4-mini`, `codex-auto-review` — context\nwindows synced from the proxy's own metadata. Reasoning always on\n(off maps to lowest effort); `-fast` suffix variants if the proxy lists them.\nFree-plan Codex quotas apply.\n\n## Prerequisite: the bridge account pool\n\nThe web bridge needs at least one ChatGPT web account (access_token) in its\npool — add one via the bridge admin panel (`http://172.30.55.22:3001/accounts`).\nWith an empty pool, **every completion fails** with a 502 upstream error; the\nextension surfaces this as an actionable hint via `message_end` normalization.\n\n⚠️ **Ban risk is real.** All web2api bridges violate OpenAI's ToS for automated\nuse. Use a burner account, never a valued one. Usage is also **not unlimited**:\nfree web tier has per-account and per-IP rate limits, and agent-style traffic\nis conspicuous. Tool-call fidelity through the bridge should be verified before\ndaily-driving it.\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `/login-chatgpt-web` | Configure bridge URL + auth key (TUI) |\n| `/chatgpt-web-model` | Search and select a chatgpt-web model (TUI) |\n| `/chatgpt-web-status` | Show status, models, and account pool health |\n\n## Design notes\n\n- Provider id: `chatgpt-web`, api: `openai-completions`.\n- Models discovered live from `GET {baseUrl}/models`; `gpt-5*` family and\n  `auto` registered as reasoning models, image models filtered out. Cost is\n  zero (web tier, not billed). Context window falls back to 128k placeholders\n  (the bridge's model list carries no window metadata).\n- Startup never blocks on the bridge: disk cache first (`~/.cache/pi/chatgpt-web-models.json`),\n  then background discovery with a 5s timeout, re-registering on success.\n- Bridge failures with `upstream_error` / `backend-anon` are rewritten to\n  \"empty account pool\" hints; rate-limit and overflow errors pass through\n  untouched.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}