mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
Following the BYOK (ChatGPT Subscription) instructions in `codex.md` on a deployment without a ChatGPT provider fails with `404 route not supported: POST /chatgpt/v1/responses`. The `/api/v2/aibridge/chatgpt/v1` route only exists when an admin has created a provider named `chatgpt`, and that requirement wasn't documented anywhere. ## Changes - `providers.md`: new **ChatGPT** subsection alongside the other per-provider sections: type `openai`, name must be exactly `chatgpt`, base URL `https://chatgpt.com/backend-api/codex`, no API keys (auth comes from each user's ChatGPT OAuth token via BYOK) - `codex.md`: - prerequisite admonition in the ChatGPT Subscription section linking to the provider setup, with the 404 symptom for troubleshooting - template recipe for the ChatGPT subscription flow (`base_config_toml` + `coder_env` injecting `CODER_API_TOKEN`), since the existing recipe only covers the centralized API key flow - bump the codex module pin from `~> 4.1` to `~> 5.0` (latest is 5.1) ## Verification - All three gaps were hit and the documented configuration verified end-to-end on a live deployment: provider created via the AI Providers API, Codex CLI 0.139.0 authenticated with ChatGPT login, sessions visible in the AI Sessions UI - `pnpm run format-docs` and `pnpm run lint-docs` clean (0 errors), `pre-commit-light` hooks passed Linear: [DOCS-354](https://linear.app/codercom/issue/DOCS-354) 🤖 Generated with Coder Agents on behalf of @bpmct