rooster-floor-turns

Record Turn Decision

Changed on

Validate the lane's answer, file its cost, record the decision and end the turn.

Order matters. (1) The run's cost is filed in model_calls FIRST, success or not, because the tokens were spent either way (a late answer included). (2) The turn must still be claimed: a late answer from a worker whose claim lapsed is 409, never a second decision (its spend is filed as a failed call). (3) A malformed answer fails the turn with the reason and answers 422. (4) A valid one goes through floor_turns.record_decision against the packet the claim stored, with the model_calls id; the row read back is the receipt.

post/api/rooster/floor/turns/{turn_id}/decision

Request

  • Base URL
    https://api.pigeonly.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Path parameters

turn_id, string uuid required

Request body

DecisionRequest required

The lane's final message, UNPARSED (the server validates it), and what the run cost.

latency_ms, integer
turns, integer nullable
input_tokens, integer nullable
cache_creation_tokens, integer nullable
cache_read_tokens, integer nullable
output_tokens, integer nullable
output, string required
model, string required
provider, string
claim, string nullable

Response

Successful Response

object required

Changes