Claudia Router is a local Anthropic-compatible proxy for Claude Code-style workflows.
It accepts Anthropic /v1/messages requests and routes them to OpenAI-compatible model providers.
Primary focus: NVIDIA-backed Claude usage with a simple first-run setup.
If you want the shortest path, use the NVIDIA-first flow:
git clone https://github.com/ChunkyMonkey11/Claudia-Router.git
cd Claudia-Router
npm install
npm run quickstart
npm run dev
npm run claude:fastIf setup fails:
npm run doctornpm run quickstart is the main first-run path. Add -- --start to launch the router automatically after setup. Add -- --profile glm only if you want to choose a different preset during onboarding.
If your NVIDIA key changes later:
npm run keyIf you need the current router state:
npm run statusIf you want to switch presets without editing .env:
npm run profilePress Enter to keep the fast preset.
When published, the intended user path is:
npm install -g claudia-router
claudia-router init
claudia-router dev
claudia-claudeIf you do not want a global install:
npx claudia-router init
npx claudia-router doctorIf you are working on the repository itself, you can link the wrapper locally:
npm linkKeep the router running, then start Claude in another terminal:
npm run claude:fastAfter a global install, you can use the wrapper from any coding project:
cd /path/to/your/project
claudia-claudeThe wrapper runs claude with ANTHROPIC_BASE_URL pointed at the local router and the default router model already set.
By default it uses local auth so NVIDIA-only users can run it immediately.
Pass normal Claude Code arguments as usual:
claudia-claude --model claude-3-5-sonnet-glmIf you want Claude Code managed login instead, opt in explicitly:
claudia-claude --managed-authFrom this repository:
npm run claude:fast -- --managed-authIf you see a managed-login warning, remove --managed-auth. Claude managed credentials are sent only to the local router; your NVIDIA key is sent to NVIDIA by the router.
The fast script and default wrapper route claude-3-5-sonnet-latest to NVIDIA nvidia/nemotron-3-super-120b-a12b. Use npm run claude:glm for the slower thinking-heavy GLM quality profile, npm run claude:qwen for the Nano fallback, or npm run claude:smoke to test routing with the smallest configured model.
Model tradeoffs:
fast: best default for long prompts and coding; slower than smaller models, but much less likely to hit context limitsglm: stronger on hard tasks when it reasons longer, but slowerqwen: backup option when you want a lighter fallback, but less consistent on complex codesmoke: smallest and quickest option for health checks, not real work
Test the server:
curl http://localhost:8082/healthSend a Claude-style request:
curl http://localhost:8082/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: dummy" \
-d '{
"model": "claude-3-5-sonnet-latest",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": "Write a TypeScript function that reverses a string."
}
]
}'V1 is configured to use NVIDIA NIM by default.
- Put your NVIDIA API key in
.env:
NVIDIA_API_KEY=your_nvidia_key_here
CLAUDIA_CONFIG=./config.json
LOG_LEVEL=info-
Keep
defaultBackendset tonvidiainconfig.json. -
Use a mapped Claude-style model alias such as
claude-3-5-sonnet-latest, or send any model name and Claudia Router will use the NVIDIA backend default model (nvidia/nemotron-3-super-120b-a12b).
If you want to switch providers later, use npm run init -- --provider openrouter or npm run init -- --provider local. Use npm run config if you prefer the interactive provider picker.
If you want to switch local Claude profiles without editing .env, run npm run profile and choose a preset, or use npm run profile -- fast, npm run profile -- glm, npm run profile -- qwen, npm run profile -- list, or npm run profile -- toggle.
Use npm run profile -- show to see the current active profile. Use npm run status to see the active profile plus the next command to run.
For repeatable installs or CI, npm run init also accepts:
--provider nvidia|openrouter|localto override the default--yesto skip confirmation prompts--skip-smoketo skip the provider smoke test--api-key-env NAMEto read the key from an existing environment variable
Example:
NVIDIA_API_KEY=your_key npm run init -- --yes --api-key-env NVIDIA_API_KEYSee the config example and model routing details later in this README if you need to customize backends or model aliases.
npm run doctor
npm run statusnpm run typecheck
npm test
npm run build
npm run release:smoke
npm run release:checkcurl http://localhost:8082/health
curl http://localhost:8082/v1/messagesBefore publishing to npm:
- Run
npm run publish:check. - Run
npm publishfrom a clean, tagged working tree. - Verify a fresh machine can install and launch with
npm install -g claudia-router. - Verify
npx claudia-router initworks if you do not want a global install.
npm run release:smoke performs a clean-package install check by running npm pack, installing that tarball into a fresh temp directory, then validating all setup entry paths: local (--provider local), OpenRouter (--provider openrouter --api-key-env ... --skip-smoke), and default NVIDIA (init --api-key-env ... --skip-smoke), with claudia-router doctor after each.
npm run release:check is the main release gate. It runs check (typecheck + tests), build, and release:smoke.
npm run publish:check is the publish gate. It runs release:check and a dry-run pack to verify the npm artifact before publishing.
See RELEASE_READINESS.md for the requirement-by-requirement audit and current evidence.
Claudia Router is text-only today. It buffers streaming responses until the provider finishes, then returns Anthropic-style SSE events. That is intentional for now, because it keeps NVIDIA, OpenRouter, and local backends predictable while the compatibility tests mature. Live token-by-token passthrough is still on the roadmap, but only after provider stream formats are normalized and covered by tests. Vision, prompt caching, and full Claude Code compatibility are not done yet.
- QUICKSTART.md for the fastest setup path
- config.example.json for the full configuration shape
- RELEASE_READINESS.md for the release audit and evidence
- NEXT_STEPS.md for the current roadmap and handoff notes
Before opening a pull request:
- Run
npm run release:check. - Update docs if behavior changes.
- Add or update tests for user-facing changes.
- Keep the NVIDIA-first setup path obvious in the README and quickstart docs.
MIT. See LICENSE.