routing

Rank Candidates

Record scored examples: one routing-memory record each, plus an audit row.

The routing-memory record is written before its audit row for each example, because it is the load-bearing one (the router votes over it) and embedding it can fail; writing the audit row only afterwards means a failed embedding never leaves an orphan audit row.

A failed embedding is a 502 that names the model, not a 500. Every example in the batch is embedded, so this is the call an operator makes most often and the one most likely to meet a misconfigured router_embedding_model.

Score keys are stored canonically as instance:model (see :func:_validated_scores), which is the form the router canonicalizes its candidates to, so how a policy spells a candidate cannot decide whether it matches.

post/v1/routing/preferences/rank

Request body

user_idstring required

Whose routing memory these examples belong to.

workspace_idstring uuid nullable

Which workspace's routing memory these examples belong to. Omit for the deployment's default workspace. Only requests billing to that workspace vote over them.

Response

Successful Response

recordedinteger required
seed_countinteger required

Changes