Documentation
Models and quotes
View .mdOpenAPI

Promote a version to champion

POSThttps://weights.fyi/run/v1/models/{model}/promotescope: submit
text
POST https://weights.fyi/run/v1/models/<model>/promote
Authorization: Bearer <token>                    scope: submit
{"version_id": "<id>", "force": false, "companions": [{"model": "<model>", "version_id": "<id>"}]}
Available since
2026-10-20 model versions: included in this build; see What is live for deployment status.
Answer time
synchronous: the aliases change at once, then the call waits while each MLflow trace destination of your workspace is brought up to date, if you have any.

Makes a registered version the champion of a specialist (one of the service's task models with a fixed contract, such as laya-link-scorer). The champion is the version that serves: POST /v1/classify runs its bundle unless a call pins another version. The champion it replaces becomes previous, a challenger (the newest candidate) that is the promoted version is cleared, and one receipt records the promotion and the rule it met.

Without force, two checks guard the champion. The version must have passed its own gate (metrics.gate_passed), and it must beat a standing champion: a macro-F1 at least 0.002 higher, or a macro-F1 no more than 0.001 lower with a calibration error (ece) at least 0.005 lower. A first champion needs only its own gate; force: true skips both checks. Promoting the current champion answers 200 with promoted: false. companions promote other specialists of the same release in the same transaction, every one or none: the first refusal is the answer and nothing changes.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with submit.
modelpathyesA specialist's id, e.g. laya-link-scorer.
version_idbodyyesThe registered version to make the champion.
forcebodynotrue promotes without the two checks, the companions too; false by default.
companionsbodynoA list of {"model", "version_id"}: other specialists, each named once and never the path's own, promoted by the same rules.

Return value

200 OK with the promotion:

FieldMeaning
objectmodel.promotion.
model, version_idWhat was promoted.
promotedfalse when the version already was the champion: nothing changed, and id, replaced_version_id, forced and gate are left out.
serving_statusbundle_ready when the version has a bundle or an artifact reference, else metadata_only.
idThe promotion's receipt number.
replaced_version_idThe champion it replaced, now previous; null for a first champion.
forcedWhether force was sent.
gateThe figures compared: candidate, champion, thresholds, passed, forced, and rule: first_champion, macro_f1_gain, ece_gain_at_held_macro_f1, or null when only force carried it.
aliaseschampion, challenger and previous after the call.
registryOne outcome per MLflow trace destination: sink_id and ok; a failed sync changes neither the status nor the promotion.
companionsWhen you sent companions: each one's promotion in this shape, in the order sent.

Errors

StatusCodeWhen it happensWhat to do
400invalid_version, invalid_body, invalid_jsonA field is unknown, missing or malformed (field and expected say which), or the body is no JSON object.Fix the request.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks submit, or the account is suspended.Use a token with submit.
404model_not_versioned, version_not_foundThe path's model or a companion's is not a specialist, or a named version is not registered; the body names the model.Register the version first.
409promotion_refusedWithout force: reason is gate_not_passed or not_better_than_champion, and gate holds the figures. Nothing changed, for any companion either.Register a better version, or send force: true when you mean it.
413body_too_largeThe body is over limit_bytes.Send a smaller body.
429rate_limitedThe token sends work faster than its request rate.Wait the Retry-After seconds and send again.

Examples

With laya-link-scorer in place of MODEL, a first champion:

sh
curl -s https://weights.fyi/run/v1/models/MODEL/promote -H "Authorization: Bearer $WEIGHTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version_id": "2026-11-02.1", "force": false}'
json
{
  "object": "model.promotion",
  "model": "laya-link-scorer",
  "version_id": "2026-11-02.1",
  "promoted": true,
  "serving_status": "metadata_only",
  "id": 17,
  "replaced_version_id": null,
  "forced": false,
  "gate": {
    "candidate": {"macro_f1": 0.912, "ece": 0.031, "gate_passed": true},
    "thresholds": {"gain_macro_f1": 0.002, "hold_macro_f1": 0.001, "gain_ece": 0.005},
    "champion": null, "passed": true, "rule": "first_champion", "forced": false
  },
  "aliases": {"champion": "2026-11-02.1", "challenger": null, "previous": null},
  "registry": []
}

History

  • 2026-10-20: built.
  • 2026-11-16: this page added.

See also