Claude Skill
NadirRouter/NadirClaw
NadirClaw 是一款开源 LLM 路由器,自动将简单提示路由至廉价/本地模型,复杂提示路由至高端模型。作为 Claude Code、Codex、Cursor、OpenClaw 的即插即用 OpenAI 代理,自托管可节省 40-70% 的 AI API 成本。
概览
仓库信息
安装这个 Skill
pip install nadirclawRegistry 信息
pip install nadirclawgit clone https://github.com/doramirdor/NadirClaw.gitpip install -e .git clone https://github.com/doramirdor/NadirClaw.git && cd NadirClawdocker run -p 8856:8856 --env-file .env nadirclaw
项目简介
NadirClaw 是一款开源 LLM 路由器与 AI 成本优化器,可自动将简单提示路由至廉价或本地模型,复杂提示路由至高端模型。作为即插即用的 OpenAI 兼容代理,支持 Claude Code、Codex、Cursor、OpenClaw 等工具,可节省 40-70% 的 AI API 成本。支持自托管,无需中间商。
Open-source LLM router & AI cost optimizer. Routes simple prompts to cheap/local models, complex ones to premium — automatically. Drop-in OpenAI-compatible proxy for Claude Code, Codex, Cursor, OpenClaw. Saves 40-70% on AI API costs. Self-hosted, no middleman.
要点
- 基于提示复杂度自动路由
- 即插即用的 OpenAI 兼容代理,支持主流 AI 工具
- 自托管,无需第三方中间商
- 支持通过 Ollama 使用本地模型及 Gemini 等高端模型
- 可节省 40-70% 的 AI API 成本
- 使用 Python 编写,易于部署和扩展
使用场景
- 降低 Claude Code 和 Codex 工作流的 API 成本
- 优化 Cursor IDE 中的 AI 支出
- 将简单查询路由至通过 Ollama 运行的本地模型
- 为 OpenClaw 部署成本感知代理
- 为开发团队自托管智能 LLM 网关
README 摘要
<p align="center"> <a href="https://getnadir.com"> <img src="docs/images/banner.png" alt="NadirClaw — Cut LLM & Agent Costs 40-70%" width="100%" /> </a> </p> <h1 align="center">NadirClaw</h1> <p align="center"> <strong>Your simple prompts are burning premium tokens.</strong><br> NadirClaw routes them to cheaper models automatically. Save 40-70% on AI API costs. </p> <p align="center"> <a href="https://pypi.org/project/nadirclaw/"><img src="https://img.shields.io/pypi/v/nadirclaw" alt="PyPI" /></a> <a href="https://github.com/doramirdor/NadirClaw/actions"><img src="https://github.com/doramirdor/NadirClaw/actions/workflows/ci.yml/badge.svg" alt="CI" /></a> <a href="https://pypi.org/project/nadirclaw/"><img src="https://img.shields.io/pypi/pyversions/nadirclaw" alt="Python" /></a> <a href="LICENSE"><img src="https://img.shields.io/github/license/doramirdor/NadirClaw" alt="License" /></a> <a href="https://github.com/doramirdor/NadirClaw"><img src="https://img.shields.io/github/stars/doramirdor/NadirClaw?style=social" alt="GitHub stars" /></a> </p> <p align="center"> Works with <strong>Claude Code</strong> · <strong>Cursor</strong> · <strong>Continue</strong> · <strong>Aider</strong> · <strong>Windsurf</strong> · <strong>Codex</strong> · <strong>OpenClaw</strong> · <strong>Open WebUI</strong> · Any OpenAI-compatible client </p> <p align="center"> <a href="https://getnadir.com?ref=readme-nav"><strong>Nadir Pro (hosted)</strong></a> · <a href="#quick-start">Quick Start</a> · <a href="#nadirclaw-vs-nadir-pro">OSS vs Pro</a> · <a href="docs/comparison.md">Comparisons</a> · <a href="https://github.com/doramirdor/nadirclaw-action">GitHub Action</a> </p> <p align="center"> <sub>Running real traffic or a team? <a href="https://getnadir.com?ref=readm