model management

Preview Auto Router Routing

Route a single request through a complexity-router config and report where it landed.

Answers "which model would this request get?" for a config that only exists in a form, so an auto router can be checked before it is created. The request is classified by the same pre-routing hook a live request runs, over the same messages, system prompt and tool definitions, then dropped: nothing is sent to the model it routed to, and no auto router is created. A heuristic config therefore spends nothing, while an llm classifier or semantic keyword matching bills its classifier/embedding call to the calling key, like Test Connection does.

Send messages to classify a real turn, with system and tools beside it when the surface carries them top level, as Anthropic /v1/messages does. prompt is the single-ask shorthand and routes as one user turn with nothing around it.

Example Request:

{
    "messages": [
        {"role": "system", "content": "You are a database migration assistant"},
        {"role": "user", "content": "the index is not unique"},
        {"role": "assistant", "content": "Then two workers can both insert. Add a unique index"},
        {"role": "user", "content": "ok do it"}
    ],
    "tools": [{"type": "function", "function": {"name": "Bash", "description": "Run a command"}}],
    "complexity_router_config": {
        "tiers": {"SIMPLE": ["gpt-4o-mini"], "REASONING": ["o3"]},
        "classifier_type": "heuristic"
    }
}
post/auto_router/test_routing

Request body

promptstring nullable

A single ask to route, as an end user would send it. Mutually exclusive with messages

messagesobject[] nullable

The full message list to route, exactly as the serving path would receive it. Mutually exclusive with prompt

toolsobject[] nullable

The tool definitions the request advertises, which decide whether the plan-mode floor applies

default_modelstring nullable

Model to route to when no tier resolves, i.e. complexity_router_default_model

router_namestring

Name reported as the router in the routing decision. Display only

team_idstring nullable

Team the router is being created for. Required for a team admin, who may only test their own team's routers

Response

Successful Response

routed_modelstring required

The model group the router picked

routed_model_configuredboolean required

Whether routed_model is a model group available to the caller, scoped to team_id when given. Never confirms models the caller could not use

Changes