Skip to main content
Steps to integrate Codex with Pioneer:
  1. Download and set up the Codex CLI.
  2. Run Codex
  3. Log in with option 3 and enter your PIONEER_API_KEY
  4. Open ~/.codex/config.toml and add these lines
  1. Restart Codex
  2. Enter the following prompt into Codex
  1. Install the routing-savings hook. Codex strips Pioneer’s custom response fields from its on-disk rollout, so the hook reads your session id and asks Pioneer how much pioneer/auto has saved this session. Make sure PIONEER_API_KEY is set, then paste this block:
Restart Codex and run /hooks to trust the hook. Each turn that routes to a model cheaper than the frontier reference then ends with:
  1. Switch between models with /model command.
  • The pioneer/auto router will automatically route your request to the cheapest model!
  • You should also be able to see our entire Pioneer Model Catalog with /model command
The Pioneer dashboard Integrations guide copies this same block with your API key already filled in.