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/{workspace}/{model}/rollbacksAuthorization
Send a Modaic bearer token in the Authorization header.
Path Parameters
User or organization workspace slug.
Model repository slug. The caller needs the route-specific repository access.
Body
Branch to move.
Commit whose files become the branch head again. Find it with
List commits or from an
optimization job'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 optimization run that a later update overwrote: list the commits, find the run's commit, and roll the branch back to it. New decisions then record the restored checkpoint again.