Recommend Model For Agent
Changed onRecommend the model a subagent about to start should run on.
The harness sends the facts it holds at spawn time: its own ids for the session and the spawning tool call, the subagent type, the task, the parent's model and the model the caller asked for, if any. The recommender this build binds picks one of the candidate models and the answer names it. A standalone deployment asks the decision model agent_recommender_model names to choose among agent_recommender_candidates for Claude Code and among the request's own candidates for pi; a hosted build may bind a recommender of its own, which the caller never configures. Where the recommender reports them, the answer also carries a one-line reason and its probability for each candidate.
Authentication modes:
- Master key: the user field is required and names who the decision is billed to.
- API key: the decision is billed to the key's own user.
Request
- The document declares no server URL.
- Auth: one of:
- API key in header Otari-Key
- API key in header x-api-key
Request body
Example request
{
"agent_type": "Explore",
"description": "Find the budget reservation code",
"harness": "claude-code",
"parent_model": "claude-opus-5",
"prompt": "Find where budgets are reserved before dispatch and report the call chain.",
"session_id": "bf05abe2-5ff2-4eb0-8459-ab578d5c9468",
"tool_use_id": "toolu_01Ab3dEfGh"
}Response
Successful Response
Example response
{
"model": "sonnet",
"probabilities": {
"haiku": 0.21,
"opus": 0.07,
"sonnet": 0.72
},
"reason": "jev-1.13.0 chose sonnet with 72%"
}Changes
- breaking
request property
was restricted to a list of enum values - info
added the new optional request property
- info
added the new
claude-codeenum value to the request property - info
added the new
pienum value to the request property - info
the
request property's minLength was decreased from1to0
- breaking
- info
added the optional property
to the response with the status
- info