模型路由 2026:Replit Auto 模式、Cursor 路由与 OpenRouter 被收购背后的省钱逻辑

·阅读约14分钟·Evergreen Tools Team
Model Routing

💡 工具推荐调试路由逻辑与 API 响应时,试试 Evergreen Tools 的 JSON格式化工具API测试工具UUID生成工具,全部免费!

2026 年 8 月,模型路由从「极客玩具」变成了平台默认:Stripe 同意以约 $8B 收购模型网关 OpenRouter;同一天 Ramp 上线 Router.com——把请求路由到满足性能门槛的最便宜模型;7 月 Cursor 发布自己的路由器,号称同等性能大幅降价;Meta 被曝正在做内部路由器 Switchboard,按难度打分把简单任务丢给便宜模型。Replit 则直接把 Auto 模式设为所有账号的默认。本文拆解这波省钱逻辑,并给出可落地的路由代码。

1. 为什么路由突然成了主战场

Replit 的 AI 负责人 Michele Catasta 说得直白:「同一个模型家族内,每 token 价格可以差好几个数量级;同时,更便宜的小模型智能水平已经非常接近大型前沿模型。」这两件事叠加,就产生了巨大的优化空间。过去你无脑用最强模型,现在你可以按任务难度付钱——简单任务用便宜模型,只有最难的任务才动用旗舰。平台们纷纷把路由做成默认,是因为省下的成本就是它们的竞争力。

// The landscape shift in one snapshot (2026):
// - Stripe agreed to acquire OpenRouter for ~$8B (Aug)
// - Ramp launched Router.com the same day: route to the
//   lowest-cost model that meets a performance bar
// - Cursor (SpaceX-owned) shipped its own router in July:
//   comparable performance at substantially lower cost
// - Meta is reportedly building "Switchboard": scores tasks
//   by difficulty, sends easy ones to cheap models
// - Replit made Auto mode (intelligent model routing) the
//   DEFAULT for every account

const why = "Across one model family, per-token rates can span orders of magnitude. And cheaper, smaller models are now much closer to their larger frontier counterparts.";
// — Michele Catasta, President & Head of AI, Replit
Routing Primitive

2. 路由的核心原语:按质量门槛选最便宜模型

最简路由就一个函数:评估任务难度,设定质量门槛,在所有候选模型里选成本最低且质量达标的那一个。容易任务 -> 小模型,中等任务 -> 中档模型,困难任务 -> 旗舰模型。就这么简单,但收益巨大——那些高频的简单任务不再付旗舰价格。

// The core routing primitive: score the task, pick the
// cheapest model that clears the quality bar.

type Task = { difficulty: "easy" | "medium" | "hard"; type: string };

const MODELS = [
  { name: "flash-mini",  cost: 0.1,  quality: 60 },
  { name: "flash",       cost: 0.3,  quality: 80 },
  { name: "opus-class",  cost: 3.0,  quality: 98 },
];

function route(task: Task): string {
  const bar = task.difficulty === "easy" ? 65
            : task.difficulty === "medium" ? 80
            : 92;
  const candidates = MODELS
    .filter((m) => m.quality >= bar)
    .sort((a, b) => a.cost - b.cost);
  return candidates[0].name;
}

// easy -> flash-mini, medium -> flash, hard -> opus-class
// The easy tasks no longer pay frontier prices.

3. Replit 的 Auto 模式与 Free Mode

Replit 上周先推出 Free Mode:一种不消耗 usage credits 的 Agent 模式,用 Auto 替用户选模型。现在 Auto 模式成为所有账号的默认,Core 和 Pro 订阅者仍可手动覆盖。Replit 团队透露,他们在 beta 中测试了 Auto 模式的早期版本、subagent 路由和多轮迭代,核心学习是「从第一性原理理解每个实验的失败模式」。

// Replit's Free Mode: Agent mode that doesn't consume usage
// credits, using Auto to pick the model on the user's behalf
// subject to usage limits. Then Auto became the default for
// everyone — Core and Pro can still override manually.

const replitFreeMode = {
  credits: 0,
  modelSelection: "auto",
  usageLimit: "subject to plan",
  override: "Core/Pro subscribers can pick models manually",
  subagentRouting: "early versions tested for months",
};

// The takeaway: routing is now a platform default, not a
// power-user feature.

4. Cursor、Router.com 与 Switchboard

Cursor 7 月上线的路由器为编码请求自动选模型,宣称同等性能大幅降低价格;Router.com 的逻辑是「最低成本 + 性能门槛」;Meta 的 Switchboard 按难度给编码任务打分。殊途同归:模型能力已经溢出,按需付费才是 2026 的玩法。

Guardrails

5. 自己搭路由:质量护栏 + 升级策略

别等平台,自己搭也不难。默认走便宜模型,当任务重要或输出验证失败时再升级到旗舰。护栏启发式包括:JSON 合法性、测试通过率、diff 大小、自一致性检查。核心原则是「先便宜,验证不过再升级」——而不是「永远最贵」。

// Building your own quality guardrail: route cheap by
// default, escalate when the cheap model fails or the task
// matters. This is the Router.com pattern.

export async function smartComplete(prompt: string, opts: RouteOpts) {
  const model = route({ difficulty: opts.difficulty, type: opts.type });
  const out = await callModel(model, prompt);

  if (opts.difficulty === "hard" && !(await verify(out))) {
    // escalate to frontier model only when needed
    const retry = await callModel("opus-class", prompt, { seed: out });
    return retry;
  }
  return out;
}

// Guardrail heuristics: JSON validity, test pass rate,
// unit test coverage, diff size, self-consistency check.

6. 生产级 fallback 链与熔断器

生产环境里把路由做成 fallback 链:便宜模型 -> 中档 -> 旗舰,加熔断器防止某个劣化供应商拖垮延迟预算。同一个模型家族内每 token 价格差几个数量级——路由可能是你代码库里性价比最高的 20 行函数。

// Fallback chain in production: cheap model -> medium ->
// frontier, with a circuit breaker so a degraded provider
// doesn't tank your latency budget.

const chain = ["flash-mini", "flash", "opus-class"];

export async function routeWithFallback(prompt: string) {
  for (const model of chain) {
    if (breaker.isOpen(model)) continue;
    try {
      return await callModel(model, prompt, { timeoutMs: 8000 });
    } catch (e) {
      breaker.recordFailure(model);
      console.warn("falling back from", model, e.message);
    }
  }
  throw new Error("all models exhausted");
}

// The economic insight: across one model family, per-token
// rates span orders of magnitude — routing is the cheapest
// 20-line function in your codebase.

📌 常见问题 FAQ

为什么 2026 年模型路由突然爆火?

两个因素叠加:同一模型家族内每 token 价格可差几个数量级,而便宜小模型的智能水平已接近大型前沿模型。按任务难度付费的空间巨大,平台们纷纷把路由设为默认。

Replit 的 Auto 模式是什么?

Replit 的智能模型路由,自动为任务选择模型(权衡质量、速度、成本),已设为所有账号默认。Free Mode 是不消耗 usage credits 的 Agent 模式,同样用 Auto 选模型。

OpenRouter 被收购对开发者意味着什么?

Stripe 以约 $8B 收购 OpenRouter 说明模型网关市场被主流支付玩家认可。对开发者,路由与计费一体化是趋势,模型选择会越来越自动化和平台化。

怎么自己实现模型路由?

评估任务难度设定质量门槛,选成本最低且达标的模型;默认便宜模型,输出验证失败或任务重要时升级旗舰;生产环境加 fallback 链和熔断器。

小模型真的够用吗?

对简单任务完全够用。Cursor 宣称路由后同等性能大幅降价;Router.com 的理念就是最低成本 + 性能门槛。关键是先跑基准确定自己的质量门槛。