tierline
tierline
粘贴提示词,找出真正应该运行它的模型。
$ npx tierline "summarise these 4000 support tickets into themes, we run this nightly" -n 100000
Gemini Gemini 3 Flash Lite text / minimal tier
The floor. Routing, tagging, dedupe.
$0.000162 per call
at 100,000 calls a month $16.22
everything through Claude Opus 5 $3,033
saves $3,017 a month, 99%大多数团队会选择一款前沿模型,然后将所有任务都交给它处理。这是 AI 预算中最昂贵的一个习惯,因为大部分生产环境中的提示词都是转换类任务,而成本仅为其百分之一的模型也能完美处理。
tierline 会读取提示词,分析任务的实际需求,然后给出能够满足要求的最便宜模型名称。
安装
npx tierline "your prompt here"或者克隆仓库并运行 Web 界面:
git clone https://github.com/jayj221/tierline.git
cd tierline
npm test
node server.js无依赖、无需构建步骤、无需 API 密钥。它从不调用模型,只决定你应该调用哪个模型。
Related MCP server: LLM Benchmark MCP Server
层级如何确定
四个信号,按顺序应用。
信号 | 效果 | 示例关键词 |
推理 | 提升层级 | 架构设计、推导、根本原因、权衡、竞态条件 |
转换 | 降低层级 | 总结、提取、分类、翻译、格式化 |
风险 | 设定不可突破的下限 | 合同、临床、合规、生产、责任 |
数量 | 限制上限 | 每个、每晚、大规模、90000 条记录 |
风险优先于数量。一个每天审核所有患者记录的提示词,既是高数量也是高风险,此时下限胜出,因为在这上面省钱并非真正的节省。
模态首先被检测:语音、视频、图像、音乐、转录、代码仓库、搜索或纯文本。叙述类任务永远不会被推荐文本模型,代码仓库重构任务也永远不会被推荐上下文窗口不足以容纳它的模型。
库
import { recommend, classify } from 'tierline';
const r = recommend('architect a multi region failover and reason through the trade-offs', {
monthlyCalls: 2000,
});
r.pick.label // 'Gemini 3 Pro'
r.pick.costPerCall // 0.012829
r.task.tierName // 'frontier'
r.economics.savedPct // 87
r.cautions // things the model cannot know about your situationclassify(prompt) 仅返回对任务的解读,方便你在其后接入自己的模型目录。
MCP
注册后,你的编码代理可以在将前沿模型的令牌浪费在不需要它们的任务之前,进行自我检查。
{ "mcpServers": { "tierline": { "command": "npx", "args": ["-y", "tierline", "mcp"] } } }tierline_pick_model 接收一个提示词并返回推荐。tierline_catalogue 列出所有模型。
价格
价格信息位于 src/models.js 中,是一个可编辑的表格。这些是每百万令牌(或按供应商计费方式的每字符、每秒、每图像、每分钟或每曲目)的标价(美元)。
这些是快照,而非实时数据。供应商可能会随时更改价格,且协商的企业价格也可能存在差异,有时差异很大。在任何人根据输出做出预算决策之前,请先编辑该文件,并将百分比视为趋势而非报价。
这不是什么
这不是一个代理。它不会位于你的请求路径中,不会持有你的密钥,也不会转发任何内容。它只回答问题,然后功成身退。
它不处理数据驻留、保留条款、供应商审批或速率限制。这些因素会直接排除某些模型,无论其价格如何,tierline 会在警告中说明这一点,而不是假装它们不存在。
分类器是基于关键词的规则,而非训练好的模型。这是一个刻意的权衡:你可以阅读 src/classify.js 中的每一条规则并与之争论,当输出结果是预算决策时,这比几个百分点的准确率更重要。如果你希望在请求路径中使用学习型路由器,RouteLLM 和 OpenRouter Auto 在这方面做得很好,tierline 并不与它们竞争。
它的定位
模型路由是一个繁忙的领域,但它主要分为三个重叠不多的群体。
推理代理(如 OpenRouter Auto、RouteLLM 和 LiteLLM)位于请求路径中,在调用时切换不同的文本 LLM。成本计算器(如 AICost.ai 和 WeCompareAI)为你已选择的堆栈定价。聚合器(如 Oakgen)将多种模态整合到一个信用池中。
tierline 不属于以上任何一类。它在调用之前运行,跨越多种模态(而不仅仅是文本 LLM),同时选择工具和层级,并基于“全用旗舰模型”的基线预测月度账单。这些功能单独存在,但组合起来是首创。
测试
npm test包含 24 个断言,涵盖分类、层级上下限、按席位计费工具不参与每次调用排名、单调缩放以及目录格式正确性。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA model routing advisor for autonomous agents — get cost-optimised LLM recommendations via MCP.15MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to compare LLM benchmarks, get pricing, and receive model recommendations for tasks and budgets.1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to discover, compare, and select the best AI models across multiple providers based on pricing, performance, and capabilities, with real-time cost estimation and benchmarking.9141MIT
- AlicenseBqualityDmaintenanceRoute prompts intelligently across Claude, Gemini, and GPT-4o, automatically picking the best model for every task while minimizing token cost.57MIT
Related MCP Connectors
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.
Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jayj221/tierline'
If you have feedback or need assistance with the MCP directory API, please join our Discord server