mirror of
https://github.com/vercel-labs/fx.git
synced 2026-10-28 10:15:17 +08:00
- Run a libfx agent on Codex with `provider: "codex"`: model requests and the model list go to ChatGPT's Codex endpoints through the host's `fetch` instead of AI Gateway. - Supply each session's ChatGPT credentials through a `chatgpt` callback. libfx adds them only to Codex requests, so tokens never reach the engine or a saved session. - Refresh ChatGPT tokens five minutes before they expire and once after a 401, and pass the new tokens to `onChatgptCredentials`. - Continue a durable Codex session in a new process, which asks `chatgpt` for that session's credentials. - Sign in with ChatGPT from `libfx/chatgpt` by pasting the callback address, or with device code where the workspace allows it, and refresh tokens from there.