Skip to main content
PUT
Update a routing policy

Authorizations

Authorization
string
header
required

An access token from Barndoor's identity provider, sent as Authorization: Bearer <token>. Use a service-account token from the OAuth 2.0 client-credentials grant for scripts and CI, or a signed-in user's token. The caller needs the admin role in the organization. Gateway API keys (bd-...) are not accepted here.

Path Parameters

id
string<uuid>
required

Record ID (UUID)

Body

application/json

Fields to change. Omitted fields are left unchanged.

context_breakpoints
integer<int32>[] | null
default_slot_on_failure
integer<int32> | null
description
string | null
determiner_model_alias
string | null

New determiner model.

determiner_prompt
string | null
enabled
boolean | null
model_alias
string | null
posture
null | enum<string>

savings prefers the lighter slot when the choice is close, quality prefers the more capable one, and balanced (the default) leans neither way. Posture never overrides a routing rule or the caller's model access.

Available options:
savings,
balanced,
quality
router_input_max_chars
integer<int32> | null
slots
object[] | null

Response

OK

A routing policy: a model alias that sends each request to one of its slots.

context_breakpoints
integer<int32>[]
required

Prompt sizes, in tokens, that set a minimum slot for very large requests. There is one fewer entry than slots, in strictly increasing order. Defaults to [128000, 512000].

created_at
string<date-time>
required
default_slot_on_failure
integer<int32>
required

Slot used when the determiner cannot make a choice. Defaults to 1.

enabled
boolean
required
id
string<uuid>
required
model_alias
string
required

The alias callers send in model to use this policy.

org_id
string<uuid>
required
posture
enum<string>
required

Which way the policy leans when the choice between slots is close.

Available options:
savings,
balanced,
quality
router_input_max_chars
integer<int32>
required

How many characters of the request the determiner reads. Defaults to 12000.

slots
object[]
required

The models the policy chooses between, in order from the lightest to the most capable. Slot numbers elsewhere are 0-based positions in this list.

updated_at
string<date-time>
required
description
string | null
determiner_model_alias
string | null

The model that reads each request and picks a slot.

determiner_prompt
string | null

Optional replacement for the determiner's built-in instructions. The slot list and output format are always added by the gateway.