Smart routing and budgets

Put every agent on a budget you set

Give a developer, a squad, or the whole org a token budget. As it fills, Edgee reroutes requests to open weight models mid-task, without quality loss and without interrupting the session. Combined with compression, up to 70% lower token costs, no code changes.

Works with Claude Code, Codex, OpenCode, Cursor... and more. Team plan required for routing strategies.

Agent spend grows faster than the org can govern it

Agentic workloads consume 5 to 30 times more tokens per task than chatbot workloads. At fleet scale, that is a budgeting problem before it is a technical one.

The bill doubles every six months

In the teams we work with, coding-agent spend compounds faster than headcount. Nobody signed off on the curve, and nobody can point to which team caused it.

The budget is a single number

One provider invoice for the whole engineering org. You can cap it by cutting people off, or you can let it run. There is no third option without a routing layer.

The blunt fix costs you velocity

Downgrading everyone to a cheaper model slows every task, including the ones that justified the spend. Budget control should not mean uniform degradation.

Strategies

What a Strategy looks like in practice

Here is one worked example: a squad on a $100 weekly Claude budget. Nothing below is a default. You choose the budget, the period, the thresholds, and the model at each step.

Example
platform-squadBudget: $100 per week
0 to 75%Requests go to the model the agent asked for.Routes to: Claude Opus, Claude Sonnet
At 75%Opus-targeted requests reroute.Routes to: Kimi K3
At 85%Sonnet-targeted requests reroute too.Routes to: GLM 5.2
At 100%Everything routes to the floor model. Nobody is blocked.Routes to: DeepSeek

Set your own thresholds and models, on any budget period. Spend stops climbing at the ceiling you choose, and nobody files a ticket to get unblocked.

Self-learning routing

Smart routing that learns from your own sessions

Smart routing sends each turn to the model set for its difficulty: low, medium, high, or max. Picking those models by hand is guesswork. Self-learning routing replays your team's real coding-agent sessions every week and recommends the cheapest tier map that keeps every turn on a model fit for it.

  1. 1

    Every turn gets a difficulty label

    When a developer sends a new message to their agent, the gateway rates its difficulty (low, medium, high, or max) and the kind of work while the request runs. Only the labels are stored. No added latency.

  2. 2

    Each week, your real sessions are replayed

    Edgee replays the last 30 days of labelled sessions against many candidate tier maps, with the same rules as live routing: models switch only at user turns, and a cold cache pays to rewrite.

  3. 3

    You get the cheapest map that holds

    The run recommends the cheapest tier map that keeps every turn on a model rated for its difficulty, with the replayed saving and its 95% range. It never recommends a map that would have cost more than what you paid.

  4. 4

    Apply it, or let it update itself

    One click turns the map into a smart routing Strategy you assign like any other. Switch updates to automatic and the weekly run applies new maps only when every guardrail passes.

Example
Self-learned routingWhere your tokens go
Model todayWith the map
Claude OpusClaude SonnetMaxClaude OpusHighClaude SonnetMediumGLM 5.2LowDeepSeek
Replayed on 30 days of your sessions, with the saving and its 95% range. Never recommends a map that would have cost more than what you paid. Apply it in one click, assign it like any Strategy.
Example
Replay a sessionOne real session, run again with the recommended map
DifficultyLowMediumHighMax
Difficulty labelTodayWith the mapCost so farClaude Opus on every turnSonnetGLM 5.2DeepSeekOpusSonnetGLM 5.2TodayWith the map1234567891011121314Turn

Each column is one turn: a prompt and everything the agent did until the next one. Models switch only when a person writes; turns the agent wrote itself (dashed) keep their model, so the cache stays warm.

Learned from your traffic, not a benchmark

Your agents, your prompts, your cache behavior, your prices. The map only uses models your Model access policies and providers allow.

Guardrails on every automatic update

A new map rolls out on its own only with medium or high confidence, a saving clearly above zero, and models that have already served enough of your traffic.

Every change can be undone

Each apply is logged on the self-learned Strategy. Undo the latest one to restore the previous map and switching settings.

Turns are labelled under zero data retention: only the labels are kept, never the message text. Labelling runs on Edgee's credentials, not your keys. Available on Team and Enterprise, for organization admins. Read the self-learning docs

Routing rules

Six things a policy can react to

Budget thresholds are the primary trigger. Outage and rate-limit handling come with them.

Route on budget consumption

Thresholds are the primary trigger. As a Strategy burns through its budget, successive tiers redirect more of the traffic to cheaper models. Spend flattens without anyone being blocked.

Scope to a person, a squad, or the org

Assign a Strategy to one developer, one squad, or every seat. A platform team on a tight budget and a team shipping a launch can run different policies on the same gateway.

Pin models regardless of the request

Reroute rules let you send requests to a specific model whatever the client asked for. Use it to standardize a fleet on one provider, or to keep an expensive model off a given repo.

Fall back on 429 and 5xx

When the primary model returns a rate limit or a server error, Edgee retries through the next model in the chain. Resilience is a property of the same policy, not a separate product.

Keep working past a plan cap

Hit a weekly plan cap or a hard rate limit and Edgee detects the exhausted quota, then routes to a model that is available. Works with consumer subscriptions, not just API credits.

Reroute mid-task, without quality loss

Switching models does not mean restarting the task. Edgee carries the session across the switch, so a refactor that started on Opus can finish on an open weight model.

Model catalog

Route to any model in the catalog

247 models across 62 provider routes, frontier and open weight. Every one of them is a valid target for a routing rule.

A few of the ones teams reach for most:

Frontier

What your agents ask for by default.

Claude Sonnet 5

1M context · 6 routes

$2.00per M in

Gemini 3.1 Pro Preview

1M context · 2 routes

$2.00per M in

Grok 4.6

500K context · 6 routes

$2.00per M in

Claude Opus 5

1M context · 7 routes

$5.00per M in

GPT-5.6 Sol

1M context · 5 routes

$5.00per M in

Claude Fable 5.1

1M context · 3 routes

$10.00per M in

Open weight

Where routing sends the request as a budget fills.

GLM 5.3 Flash

1.0M context · 8 routes

$0.15per M in

DeepSeek V4.1 Flash

1.0M context · 11 routes

$0.15per M in

MiniMax M3

1M context · 4 routes

$0.30per M in

DeepSeek V4 Pro

1.0M context · 7 routes

$0.43per M in

GLM 5.3

1.0M context · 15 routes

$1.20per M in

Kimi K3

1.0M context · 7 routes

$3.00per M in

Prices are the cheapest published input rate across our routes for each model. Bring your own keys for any provider in the catalog, or connect Bedrock, Vertex, and Azure.

Bring Your Own Cloud

Route to Bedrock, Vertex, or Azure

Same agent setup. Zero code changes. Your cloud account, your data. You paste credentials once and Edgee routes policy traffic through your own cloud provider, with the same latency and attribution as our hosted models.

  • AWS Bedrock credentials keyed by region
  • Google Vertex AI service account JSON
  • Azure OpenAI endpoint + API key
  • Credentials tested live before going active

AWS Bedrock

Multi-region credentials via access key. Edgee routes to Bedrock models in your AWS account.

Google Vertex AI

Service account JSON from Google Cloud Console. One paste, Edgee resolves OAuth2 tokens at runtime.

Azure OpenAI

Endpoint URL plus API key. Edgee derives the models endpoint from your deployment automatically.

How it works

Three steps. No config files. No proxy setup. No code changes.

  1. 1

    Your agents call providers through Edgee

    Install the Edgee CLI once. Claude Code, Codex, and the rest send requests through the Edgee Agent Gateway instead of calling the provider directly. No code changes.

  2. 2

    You define a Strategy and assign it

    A Strategy is a budget plus the routing rules that fire as it fills. Assign it to a developer, a squad, or every seat in the org from the console.

  3. 3

    Edgee routes every request against the policy

    On each request Edgee checks live consumption against the thresholds, picks the model the policy calls for, and meters the result. Rerouting happens mid-task, with no interruption to the session.

Claude Code requests Claude Opus

Squad budget at 78%

Past the 75% threshold in the Strategy

Edgee routes to Kimi K3

Same session, task continues

Resilience comes with the policy

Once your traffic runs through a routing policy, provider failure stops being a separate problem. A 429, a 5xx, or an exhausted plan cap moves the request to the next model in the chain, the same way a budget threshold would. Teams that adopted Edgee for cost control keep working through outages without having configured anything extra.

It also covers the billing changes. Provider credit and quota mechanics keep shifting, and a policy that already knows where to send traffic absorbs those changes without a migration.

No routing layer vs Edgee

What agent spend looks like before and after a policy.

Comparison of coding agents with and without Edgee budget-driven routing
Agents calling providers directlyAgents behind Edgee
Spend controlOne invoice, after the factBudget per developer, per squad, or per org
What happens at the capWork stops or spend overrunsTraffic reroutes to cheaper models, nobody is blocked
Model switchingManual, restart the taskAutomatic, mid-task, no quality loss
Which model fits which taskPicked once, by guessworkLearned weekly from a replay of your own sessions
Outage and rate-limit handlingWait it outNext model in the policy, within ~300ms
Model choiceOne provider only247 models across every major provider, plus BYOK
Cost attributionPer API keyPer developer, per repo, per PR, per model

Pricing

Routing policies are included in Team

Budget-driven routing, smart routing, and self-learning routing are Team plan features.

Team plan

For engineering orgs that need spend under control before the next invoice.

$30

per seat / month, 1 billion processed tokens included

Everything in Free, plus:

1 billion processed tokens per seat per month, shared across your organization

Above that, each additional billion started is billed at the seat price. Inference costs stay separate.

Smart routing

Choose models based on task complexity, or let self-learning routing adapt them from usage

Team observability: manage developers and squads usage

Control team-wide usage, coding agent access, and squad organization

Plugins

Manage skills, hooks, and MCP servers for your team

Data destinations

Export usage to your data tools

Model selection

Enable or disable models for your organization

GitHub integration (per repo / per PR attribution)

Attribution helps you track usage and costs

Set the ceiling. Keep the velocity.

About 5 minutes to install. Works with your existing agent setup. No credit card.

Questions engineering leaders ask

Part of the Edgee Agent Gateway

Routing is the first of three pillars.

Edgee also compresses what is left to send, and observes every session at team level, attributing cost per developer, per repo, and per PR. Combined, up to 70% lower token costs.