The layer you set is a ceiling
TensorCost uses the lower of two settings. The diagram shows the ladder, with what each step adds, and how the two settings combine. The two settings are:maxLayer (Node.js) or max_layer (Python) in your code, and the layer published in the console under Authority › Routing. You can turn control up or down in the console without a deploy, and your code can never be pushed past its own ceiling. Pausing routing holds the published layer at govern, and without a content-retention grant a published steer or route also runs as govern.
steer and route need a proxy URL, which is https://api.tensorcost.com; wrap() fails without one. govern does not need it.
The SDK caches the console’s layer for 30 seconds and never waits more than 250 ms for it. If TensorCost cannot be reached for five minutes, the SDK settles at govern. It keeps checking, and it never raises itself to route on its own.
Roll out one step at a time
1
Observe
Wrap your clients and leave everything at the default. Check that spend, customers and agents look right.
2
Govern
Set
maxLayer to govern and publish the same layer in Authority › Routing. Budgets, approved models and compliance profiles now apply before each call.3
Route
Set
maxLayer to route and supply the proxy URL. A call moves to another model only when a routing policy for it is switched on. Until then it goes to your provider unchanged, and the decision is recorded in Activity › Decisions.What can refuse a call
Atgovern and above, a refused call raises an error from the SDK instead of reaching the provider. Every refusal extends one base class, TensorCostRefusedError, so a single catch covers them, including refusals a newer server adds.
teamId or team_id) to apply that team’s profile.
Reliability
The SDK only goes around TensorCost when it cannot get an answer: a network error, a timeout, a 5xx, or a 429 or 402 with no refusal in it. Anything TensorCost actually answers reaches your code as an error and is never retried or sent around it.Limits by provider
Bedrock and Vertex sign requests inside their own SDKs, so they cannot use the proxy.steer and route are not available for them, and govern is accepted but not enforced yet; the SDK warns once. Anthropic at steer or route runs at govern. In Python, streamed calls at steer and route go straight to the provider.