swap_server
Replace the model running on a given port with a different one, performing a five-phase swap with automatic rollback on failure. Handles no-ops if the model is already running.
Instructions
Replace the model on this port with a different one. Primary use: an agent replacing its own brain on the harness's expected port. Performs the 5-phase swap (pre-flight, marker, stop, start, readiness) with rollback to the previous model on failure. Calling with the model already running on the port is a successful no-op (action='already_running'). Fails with action='rejected_empty' if the port is empty — use start_server for that case.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | Port number to swap the model on | |
| model_name | Yes | Name of the new model to start |