Skip to main content

Routing controls

Artemis picks the model for every auto request. You decide how it should pick, and the limits around it. These are your controls:

Five controls: Artemis option, regions, fallbackBehavior, max tokens, monthly budget

ControlWhat it doesWhere you set it
Artemis optionCost, Balanced or Quality: how much extra cost is worth a better expected answerOn each request, as the model
Region restrictionsOnly providers that serve these regions are usedOrganization, and narrowed for each project
fallbackBehaviorWhat happens when your regions rule out every providerOrganization
Max tokensThe most output tokens a project's request may ask forProject
Monthly budgetRefuses a project's requests once its month's spend reaches the budgetProject
Who can change settings?

Changing any setting needs an owner's or admin's session: the dashboard, or in the SDKs a token from auth.login(). An API key can read the settings, but a change made with one is refused with 403.

Artemis option​

Send artemis-cost, artemis-balanced or artemis-quality as the model. auto is Balanced while Balanced is on for your organization.

Each option has a quality target: Cost 92%, Balanced 97%, Quality 99% of the best single model in the pool, measured on NuRoute's training prompts. All three cost the same per token.

See Artemis options for how they pick, and which ones your organization may use (GET /v1/artemis-options).

  • Different traffic, different option? Send the option you want with each request.
  • One specific model? Name it in model instead. Nothing is picked.

Region restrictions​

A region is a part of the world where a provider runs its computers. If your data must stay in the EU, for example, you can allow only providers that run there.

Only providers that serve one of your allowed regions are used. An empty list allows all. The rule applies to every request, including those that name a model, and it applies before the model is chosen.

How to set them:

  • Organization: dashboard Settings → Regions.
  • Project: the project's Policy page.
  • API: allowedRegions (top level) on PUT /v1/routing/config. It replaces the whole configuration, so read it first and send it back with your change. For a project, use allowed_regions on PUT /v1/projects/{id}/policy (policy enforcement).

A project's regions apply on top of the organization's: they can only narrow them.

Region names are not case-sensitive: EU and eu are the same. Each region group covers its own code and the cloud regions inside it:

You allowA provider passes when it declares
EUeu, de, fr, or a region starting eu- (eu-central-1)
USus, or a region starting us-
DEde, or a region starting eu-central-
FRfr, or a region starting eu-west-
APACapac, or a region starting ap- or as-
Globalany region, so it lifts the restriction
any other nameexactly that region

The dashboard's chips save eu, us and global.

Providers with no region

A provider that declares no region (self-hosted and custom endpoints such as vLLM or Ollama) has an unknown location. So under any list without Global, it is left out. On a self-hosted installation, the operator declares a self-hosted provider's region in routing-service's provider registry.

fallbackBehavior​

This is what NuRoute does when your region restrictions rule out every provider for a request:

ValueWhat happens
failThe request is refused: 422, type no_available_model
allow_commercial (default)Any enabled commercial provider may serve it
allow_globalAny enabled provider may serve it
allow_cheapestThe cheapest enabled provider serves it

Every value except fail relaxes your regions in that case. Choose fail if a region rule must be a hard limit, for example "EU only". A project's regions are never relaxed: a request they leave nothing for is refused with 422.

How to set it: dashboard Settings → Regions, Fallback Behavior. API: policy.fallbackBehavior on PUT /v1/routing/config. More in Fallback.

Max tokens​

A token is a small chunk of text. Max tokens puts a cap on how long an answer may be.

A project's policy can cap the output tokens a request may ask for:

  • A request asking for more than the cap is refused with 400 invalid_request_error.
  • A request that sets no limit is sent with this cap (or the model's own output limit, if that is smaller).

How to set it: the project's Policy page, or max_tokens on PUT /v1/projects/{id}/policy.

Monthly budget​

A project's budget is a spending limit for the calendar month. When the hard limit is on and the month's spending reaches the budget, new requests are refused with 402 budget_exceeded.

How to set it: the project's Budget page, or PUT /v1/projects/{id}/budget. Details in Budget enforcement.

Example: "I want it cheaper"​

  1. Send artemis-cost. Its quality target is 92% instead of Balanced's 97%, at the same price per token. The saving comes from Artemis picking cheaper models more often.
  2. Set a project budget with a hard limit, so a workload cannot spend more than you planned.
  3. Cap max_tokens on the project, if long answers are what costs you.

Example: "Our data must stay in the EU"​

  1. Allow EU under Settings → Regions.
  2. Set Fallback Behavior to fail, so no request is ever relaxed to a provider outside the EU.
  3. For a single product, allow EU on its project's Policy page instead: a project's regions are never relaxed.

See also​

  • Routing with Artemis: how Artemis decides, which router decided, fallbackBehavior
  • Projects: policy and budget enforcement, project-scoped API keys