adopt model version
adopt_model_versionSwitch a model alias to a deployed model version to promote it to production or roll back to an earlier one. This audited repoint moves live traffic and clears canary splits.
Instructions
Point a model alias at a deployed model version — adoption and rollback are the same audited repoint on different rows of the chain — use it to promote a trained round into production or roll back to an earlier one. POST /v1/model_versions/{id}/adopt (API-key scope: platform:write). Returns: 200 { served_model: string } — the model name the alias now resolves to. Notes: MOVES PRODUCTION TRAFFIC: the alias's target is replaced and any live canary split on it is cleared (canary_model null, canary_percent 0). 400 'This version is not deployed yet — deploy its weights before routing traffic to it.' when served_model is null. 404 for a foreign version id or unknown alias. Feature-flag gated (fineTuning flag off → 404) unlike the GET routes. OWNER/ADMIN key required (403). Zod failure returns 400 { error: 'Invalid body: aliasName — ...' } (flat shape). Adoption stamps adopted_at on first adoption only; it is audit-logged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The model version id to route traffic to. Must be in the workspace and have a served_model (deployed). | |
| aliasName | Yes | camelCase only. Name of an existing alias in the workspace (404 'Alias "<name>" not found.' otherwise). Non-empty string required (400). |