Undo Model Change
undo_model_changeUndo the last change to a model's controls or revert the model to an earlier version. The undo is recorded and no redo is available.
Instructions
Undo the latest change to a model's controls, or revert its latest version. Mutating.
target="controls" restores exactly what the latest set revision of
the latest version replaced (list_control_revisions'
undo_target). Changes are undone latest first, one per call; the
undo is itself recorded, and the next undo goes to the change before
it. There is no redo. Verdicts the undo returns to are served again
rather than re-judged. Answers {applied: true, model_id, model_version, undone, revision, controls}: undone is the revision
undone, revision the one the undo recorded, controls the ids it
restored.
target="version" creates a new version copying the latest earlier
version not already discarded — the model, its controls and their
objective metadata — and marks the replaced version discarded. Version
numbers are never reused, and the discarded version stays readable in
the history. Findings on controls the revert removes are resolved.
Answers {applied: true, model_id, model_version, copied_from, discarded}: model_version is the new version.
A refusal comes back as {applied: false, http_status: 409, code, message}: generation_active (a build holds the model), and for
controls nothing_to_undo or set_diverged (a control the change
touched has changed since; undo the later change first), for a version
no_earlier_version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| model_id | Yes | ||
| server_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||