Open-source reasoning-effort routing for Codex and Claude Code, using the subscriptions users already have.
PromptRail classifies each submitted prompt into an effort grade. A loopback-only proxy applies that grade to the outgoing model request while preserving the user's existing ChatGPT or claude.ai authentication.
This repository contains only the client integrations. PromptRail's hosted routing service, classification technology, evaluation data, and infrastructure are not part of this repository.
| Client | Levels | Subscription |
|---|---|---|
| Codex | 6 | ChatGPT |
| Claude Code | 5 | claude.ai |
Both integrations fail visibly when routing, authentication, or protocol validation fails. They do not silently select a default effort or switch to API billing.
Install the Codex router with one command:
npx @promptrail/plugins install codexThe installer asks for the PromptRail access token without echoing it. Get your access token at promptrail.ai/plugins. For automated installs, provide the token through the environment:
PROMPTRAIL_ACCESS_TOKEN="..." npx @promptrail/plugins install codexClaude Code uses the same command shape:
npx @promptrail/plugins install claudeCheck or remove an installation with status or uninstall:
npx @promptrail/plugins status codex
npx @promptrail/plugins uninstall codexYou need:
- Node.js 20 or newer.
- A current Codex or Claude Code installation.
- A PromptRail beta access token. Request access at support@promptrail.ai.
Never commit your PromptRail access token to a repository or shell script.
Codex must be authenticated with ChatGPT:
codex login statusThe quick installer above is recommended. To install from a source checkout instead:
git clone https://github.com/PythonIaMath/PromptRail-Plugins.git
cd PromptRail-Plugins
node bin/promptrail-codex-router.mjs install \
--grader-url "https://promptrail--promptrail-codex-effort-grader-effortgrader-web.modal.run" \
--token "$PROMPTRAIL_ACCESS_TOKEN"Start a new Codex thread after installation.
Check status:
node bin/promptrail-codex-router.mjs statusUninstall and restore the previous Codex configuration:
node bin/promptrail-codex-router.mjs uninstallClaude Code must be using a first-party claude.ai subscription. API credentials and existing third-party gateways are rejected.
claude auth status --jsonThe quick installer above is recommended. To install from a source checkout instead:
git clone https://github.com/PythonIaMath/PromptRail-Plugins.git
cd PromptRail-Plugins
node bin/promptrail-claude-router.mjs install \
--grader-url "https://promptrail--promptrail-claude-effort-grader-claudeeffort-f35715.modal.run" \
--token "$PROMPTRAIL_ACCESS_TOKEN"Start a new Claude Code session after installation.
Check status:
node bin/promptrail-claude-router.mjs statusUninstall and restore the previous Claude settings:
node bin/promptrail-claude-router.mjs uninstallPromptRail does not store or sell any of your data.
Run every client test:
npm testValidate the Codex plugin:
python3 ~/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py \
plugins/promptrail-codex-routerValidate the Claude plugin and marketplace:
claude plugin validate plugins/promptrail-claude-router
claude plugin validate .Issues and pull requests for the client integrations are welcome. The hosted routing service is maintained separately and is outside the scope of this repository.
See CONTRIBUTING.md.