> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqwish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Versions, promotion and rollback

> Inspect a candidate, move production deliberately, and recover to the previous version.

Inspect a named model created by a completed fine-tune:

```bash theme={null}
curl --fail-with-body https://console.sqwish.ai/v1/models/support-router \
  -H "Authorization: Bearer $D1_API_KEY"
```

Read `production`, `candidate`, `previous` and `versions`. Each version summary names its adapter, status, serving state, gate and held-out metrics. Pointers can be null, especially before the first promotion.

## Choose a reference

| Reference | Resolves to |
| - | - |
| `support-router` or `support-router@prod` | Current production version |
| `support-router@candidate` | Newest version if it is newer than production |
| `support-router@previous` | Version production last replaced |
| `support-router@3` | Exact version 3 |
| Adapter ID from `output_model` | That trained adapter |

A named response reports both the name you requested and the exact `version` that answered. During evaluation, set `fallback: "none"` if another model's result would invalidate the comparison.

## Promote after review

When the candidate's gate and your own review are satisfactory:

```bash theme={null}
curl --fail-with-body https://console.sqwish.ai/v1/models/support-router/promote \
  -H "Authorization: Bearer $D1_API_KEY" -H 'Content-Type: application/json' \
  -d '{"version":"candidate"}'
```

Promotion verifies, loads and probes the target before moving production. The old production becomes previous. A failed gate blocks ordinary promotion; `force: true` is an explicit override and does not fix the measured regression. Inspect the evidence before choosing it.

A standalone adapter can be loaded with `/v1/models/{model_id}/deploy`. Deploying an adapter does not itself choose a named model's production pointer.

## Roll back

```bash theme={null}
curl --fail-with-body https://console.sqwish.ai/v1/models/support-router/rollback \
  -H "Authorization: Bearer $D1_API_KEY" -X POST
```

Rollback loads and probes the previous version, then swaps it with production. There must be a previous version. **Calling rollback twice swaps again**; it is not a repeat-safe recovery command. If a promotion or rollback response is lost, read the model before deciding what to do next.

## Warmth and memory

`keep_warm` describes whether production is pinned to stay loaded where residency is managed. `state` can be `loaded`, `loading`, `asleep` or null when not tracked. See [models and fallback](/guides/models-and-fallback) for waking a cold version.

`memory.replay` and `memory.holdout` summarize sampled prior data. New held-out examples are remembered when a job is created; training examples join replay when their version is promoted. This helps compare later versions against older tasks, but it is still a sample and needs your regression checks.
