v65

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0794109383.7 KB
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 in the spelling the policy uses (see :func:_validated_scores), because the router matches them against its candidate selectors by exact string.

post/v1/routing/preferences/rank

Request body

user_idstring required

Whose routing memory these examples belong to.

Response

Successful Response

recordedinteger required
seed_countinteger required