omni-budget
它能做什么
这项技能展示如何为 OmniRoute 设置费用控制和速率限制。适合想把 AI 花费和请求量控制在设定范围内的管理员。
适用场景
- ✓当用户想为某个 API 密钥或整个网关设置消费上限的时候。
- ✓当用户想查看已经使用了多少配额的时候。
- ✓当用户想在各个提供商之间更改速率限制规则的时候。
技能链接
https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-budget/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示我当前的速率限制设置,并把限制改得更严格一些。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能列出读取和更新速率限制配置的调用。每次调用都使用 bearer 令牌,完整的请求细节见 OpenAPI 规范。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Overview
Configure spending limits, token quotas, and rate-limit policies per API key or globally. Inspect current consumption and enforce cost controls across providers.
Authentication
All requests require a valid Bearer token or session cookie. Obtain a token via POST /api/auth/login or configure REQUIRE_API_KEY=false for local development.
Endpoints
GET /api/rate-limit
Get rate limit configuration
curl http://localhost:20128/api/rate-limit \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST /api/rate-limit
Update rate limit configuration
curl -X POST http://localhost:20128/api/rate-limit \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Payloads
See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.
常见问题
限制可以只针对一个密钥吗?
这项技能说明,消费上限、令牌配额和速率限制可以针对单个 API 密钥设置,也可以全局设置。
完整的请求细节在哪里?
这项技能指向网关提供的 OpenAPI 规范。
它能帮助执行费用控制吗?
能。这项技能说明可以用这些设置在各个提供商之间执行费用控制。
详情
作者的原始描述
Configure spending limits, token quotas, and rate-limit policies per API key or globally. Inspect current consumption and enforce cost controls across providers.
热度
- GitHub 星标
- 84k
- 排名
- #1421
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …