Replace a project's model router settings (lead or above)
PUT
/v1/projects/{project_id}/router
const url = 'http://127.0.0.1:8080/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/router';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true,"models":{"additionalProperty":{"cheap":"example","frontier":"example"}},"frontier_terms":["example"],"cheap_terms":["example"],"llm":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:8080/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/router \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "models": { "additionalProperty": { "cheap": "example", "frontier": "example" } }, "frontier_terms": [ "example" ], "cheap_terms": [ "example" ], "llm": true }'The router is off until a lead enables it. It routes only sessions whose user declares an API key, and the CLI applies the model as the agent’s own model flag. Nothing is proxied (ADR-0011).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
enabled
boolean
models
The cheap and frontier model per agent. An agent with no entry gets no model.
object
key
additional properties
object
cheap
required
string
frontier
required
string
frontier_terms
Array<string>
cheap_terms
Array<string>
llm
Ask the configured LLM when no rule but the default matched. The prompt goes to that LLM only then.
boolean
Example generated
{ "enabled": true, "models": { "additionalProperty": { "cheap": "example", "frontier": "example" } }, "frontier_terms": [ "example" ], "cheap_terms": [ "example" ], "llm": true}Responses
Section titled “Responses”The settings after the change.
Media typeapplication/json
object
enabled
required
boolean
models
required
object
key
additional properties
object
cheap
required
string
frontier
required
string
frontier_terms
required
Array<string>
cheap_terms
required
Array<string>
llm
required
boolean
defaults
required
The built-in terms. The project’s terms add to them.
object
frontier_terms
required
Array<string>
cheap_terms
required
Array<string>
llm_available
required
Whether the coordinator has an LLM for the tiebreak.
boolean
updated_at
required
string | null format: date-time
Example generated
{ "enabled": true, "models": { "additionalProperty": { "cheap": "example", "frontier": "example" } }, "frontier_terms": [ "example" ], "cheap_terms": [ "example" ], "llm": true, "defaults": { "frontier_terms": [ "example" ], "cheap_terms": [ "example" ] }, "llm_available": true, "updated_at": "2026-04-15T12:00:00Z"}The request is malformed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}No valid bearer token.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}The token may not do this.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}No such resource in the caller’s org.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}A rate limit or quota stopped the request. Retry-After gives seconds to wait.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Headers
Section titled “Headers”Retry-After
integer