Roll back a branch
Restore a branch to the state of an earlier commit. The rollback is itself a
new commit whose files are the target's, so model.json comes back with the
checkpoint, questions, and metrics it had at that commit, and gepa.json
returns if the target had one. History is preserved; nothing is rewritten.
Repository write access is required.
/v1/models/{modelId}/rollbacksAuthorization
Send a Modaic bearer token in the Authorization header.
Parameters
Model repository ID.
Branch to move.
Commit whose files become the branch head again. Find it with
List commits or from an
alignment's resultCommitSha.
The branch's current head. If it has moved, the request fails with
409 expected_head_mismatch and nothing changes.
Commit message for the rollback.
Response
The new head.
The head before the rollback.
This is how to recover an alignment that a later update overwrote: list the commits, find the alignment's commit, and roll the branch back to it. New decisions then record the restored checkpoint again.