What Does `auto/coding:cheap` Mean in OmniRoute? The Cost‑Optimized Coding Preset Explained

auto/coding:cheap is an Auto‑Combo routing preset that routes code‑generation requests to the lowest‑cost capable model by selecting the "coding" category and applying the "cheap" tier for cost‑optimized scoring.

OmniRoute is an open‑source LLM gateway that simplifies model selection through expressive routing presets. The auto/coding:cheap syntax provides developers with a concise way to prioritize cost savings for programming tasks without sacrificing functional requirements. This preset is implemented in the diegosouzapw/OmniRoute repository as part of the Auto‑Combo engine.

How auto/coding:cheap Works: Category + Tier Composition

The preset follows a auto/<category>:<tier> structure that OmniRoute parses into two distinct routing parameters:

  • Category (coding) — Filters the candidate pool to models optimized for code generation, such as Claude‑Coder, GPT‑5, and GLM‑Coder
  • Tier (cheap) — Applies cost‑optimized weights that select the provider with the lowest costPer1MTokens

In open-sse/services/autoCombo/suffixComposition.ts, the parseAutoSuffix function handles this decomposition. The tier "cheap" maps to the weight variant cheap (aliased as floor), which drives the cost‑saver scoring strategy【open‑sse/services/autoCombo/suffixComposition.ts†L70-L78】【open‑sse/services/autoCombo/suffixComposition.ts†L90-L101】.

The Routing Execution Flow

When OmniRoute receives a request with "model": "auto/coding:cheap", the system executes this pipeline:

  1. Build candidate pool — Query all connected providers and their available models
  2. Filter by category — Retain only models tagged with coding capabilities
  3. Sort by cost — Order the filtered pool by costPer1MTokens ascending
  4. Select cheapest viable — Pick the lowest‑priced model that meets the request's functional constraints

This ensures auto/coding:cheap always resolves to the cheapest‑per‑token option for code‑related requests.

Using auto/coding:cheap in API Requests

Basic Request with the Cheap Preset

POST /v1/chat/completions
{
  "model": "auto/coding:cheap",
  "messages": [
    {"role": "user", "content": "Write a Python function that returns the Fibonacci sequence."}
  ]
}

Equivalent Explicit Routing Configuration

The preset expands to this verbose routing object internally:

POST /v1/chat/completions
{
  "model": "auto",
  "routing": {
    "category": "coding",
    "tier": "cheap"
  },
  "messages": [
    {"role": "user", "content": "Write a Python function that returns the Fibonacci sequence."}
  ]
}

Category-Only Shortcut (Quality‑First Default)

Omitting the tier switches to a different optimization strategy:

{
  "model": "auto/coding"
}

This defaults to quality‑first weights, not cost optimization.

Key Implementation Files

File Purpose
open-sse/services/autoCombo/suffixComposition.ts Parses auto/<category>:<tier> syntax, maps "cheap" tier to cheap/floor weight variant, builds candidate filters
docs/routing/AUTO-COMBO.md Documents all Auto‑Combo presets including auto/coding:cheap as cost‑optimized coding pool
src/app/api/v1/chat/completions/route.ts API entry point receiving "model": "auto/coding:cheap" and delegating to Auto‑Combo engine

Summary

  • auto/coding:cheap combines category filtering with cost‑optimized tier selection
  • Parsed in suffixComposition.ts where "cheap" maps to the cheap/floor weight variant for cost‑saver scoring
  • Execution filters to coding models, sorts by costPer1MTokens, and selects the cheapest viable provider
  • Use case — Ideal for high‑volume code generation where cost minimization outweighs marginal quality differences
  • Alternativeauto/coding without tier defaults to quality‑first routing

Frequently Asked Questions

What happens if no cheap coding model is available?

OmniRoute falls back to the next available tier in the category pool according to the cost‑saver weight configuration. If all coding‑capable providers are offline, the request may fail or escalate to configured fallback models depending on your OmniRoute instance settings.

Can I use auto/coding:cheap with streaming responses?

Yes. The Auto‑Combo preset operates at the routing layer before the request reaches the selected provider. Streaming behavior (stream: true) is preserved and handled by whichever model the preset resolves to.

How does auto/coding:cheap differ from auto/general:cheap?

The category distinguishes them: coding restricts the candidate pool to code‑optimized models (Claude‑Coder, GPT‑5, GLM‑Coder), while general includes broader‑capability models. For programming tasks, auto/coding:cheap typically yields better functional results at comparable or lower cost than routing through generalist models.

Is the cheap tier available for other categories?

Yes. The tier system is composable with any supported category. Valid combinations include auto/vision:cheap, auto/chat:cheap, and auto/reasoning:cheap, each applying cost‑optimization to their respective model pools.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →