Record a routing observation (MAB reward)
Called by the runner at session end to report the outcome of a provider dispatch. Updates the Beta-distribution posterior for the `(provider, workType)` arm in the multi-armed bandit router and appends an observation entry. Best-effort: store errors return `{ recorded: false }` with HTTP 200 so a Redis blip never fails the worker's terminal flow.
AuthorizationBearer <JWT>Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.
id*stringapplication/json- body
provider*stringProvider slug (e.g. 'claude', 'codex').
workType*AgentWorkType"research""backlog-creation""development""inflight""inflight-coordination""qa""acceptance""refinement""refinement-coordination""coordination""qa-coordination""acceptance-coordination""merge""security"reward*numberNormalized outcome score clamped to [0, 1].
0 <= value <= 1issueIdentifier?stringtaskCompleted?booleanprCreated?booleanqaResult?string"passed""failed""unknown"totalCostUsd?numberwallClockMs?integerproject?stringObservation recorded (or soft-failed).
application/json- response
recorded*booleancurl -X POST 'https://app.rensei.ai/api/sessions/string/routing-feedback' \ -H 'Content-Type: application/json' \ -d '{ "provider": "string", "workType": "research", "reward": 0}'{ "recorded": true}Post milestone progress message
Post milestone progress message - Rensei REST API operation reference.
Sample MAB router for provider selection
Called by the cloud runner at session start to ask the platform's multi-armed bandit router which provider to use. The platform reads Beta-distribution posteriors and runs Thompson sampling over the caller-supplied candidates list. Returns `null` provider with a `source` reason on all error / disabled / explicit-override paths (HTTP 200 always) so the runner can always fall back to its statically resolved provider. Kill-switch: `ROUTING_SELECTOR_ENABLED` env must be exactly `"true"`; default is DARK. Explicit dispatch overrides always return `{ selectedProvider: null, source: 'explicit' }`.