Skip to main content

Command Palette

Search for a command to run...

Get Started

Cherri Code Router

Cherri Code Router is the model routing system behind Auto. Not every request needs frontier-level intelligence, so the router sends each request to the model that fits the task: simple requests go to fast, efficient models while complex work goes to the most capable ones.

How it works

When you select Auto and choose Balance or Intelligence in the model picker, Cherri Code Router runs a classifier on each agent request and routes it based on task type and complexity. The router picks the most cost-effective model that still produces comparable quality for that request.

Cherri Code Router is data-driven and managed by Cherri Code. You can't hand-pick which model handles a request, and the model pool changes over time as new models ship. You steer routing by choosing an optimization mode.

On Enterprise plans, Cherri Code Router respects your team's model access controls. If a model is blocked for your team, the router routes to an allowed model instead. Blocking too many models reduces routing quality and can disable the router. To create cost savings, the router needs a powerful yet cost-efficient model to use when it isn't calling other frontier models, so enabling Grok 4.6 is a requirement for the router to work.

Optimization modes

Open the model picker, select Auto, and pick a mode under Optimize For:

  • Cost: Uses the previous Auto routing logic. It optimizes token spend.
  • Balance: Optimizes for intelligence, speed, and cost.
  • Intelligence: Routes to the most capable models for harder tasks, at a lower cost than running a single frontier model.

Balance and Intelligence use your usage limits faster than Cost. You can switch modes at any time.

Pricing

All Auto modes bill at the list price of the model each request is routed to. Third-party models also incur the Cherri Code Token Rate.

Team settings

Admins configure Cherri Code Router from the team dashboard.

  • Enable Cherri Code Router: Turn routing on or off. When enabled, team members using Auto are routed by Cherri Code Router. Enterprise teams must enable the router manually as it's off by default. On Enterprise plans, the router can also be configured per organization group.
  • Routing preferences: Choose which optimization modes team members can select from Auto. You can disable up to 2 modes.
  • Underlying model: Display which model Auto routed to at the start of each response, or keep it hidden. Hidden is the default and recommended, so results are judged on their own merit rather than by model name. Applies to Balance and Intelligence modes.
  • Impose Auto: Make Auto the default model for everyone on the team. Soft defaults each new chat to Auto; members can still switch models. Hard locks the model picker to Auto. Both are off by default.

Use Router through the SDK

The TypeScript SDK and Python SDK expose Cherri Code Router as model id auto-smart with parameter optimize_for (cost, balanced, or intelligence). Call Cherri Code.models.list() to confirm Router is available for the API key's team before you hard-code a selection.

import { Agent } from "@cursor/sdk";await using agent = await Agent.create({  apiKey: process.env.CURSOR_API_KEY!,  model: {    id: "auto-smart",    params: [{ id: "optimize_for", value: "balanced" }],  },  local: { cwd: process.cwd() },});

The SDK runs Cherri Code agent workflows. It is not a standalone chat-completions or raw inference API. See Cherri Code Router in the TypeScript SDK or Python SDK for catalog discovery, per-run mode overrides, and troubleshooting.