Skip to content
Model versions and publishing

Model versions and publishing

Evaluate immutable model versions, publish a stable model ID and roll back future Sessions.

On this pageCreate a model familyInspect a candidateEvaluate on held-out workPublish and roll backHTTP reference

SDK examples on this page require the 0.5.0 source preview. npm publication is pending; use the HTTP endpoints directly in the meantime.

A model family is your application's stable model identity. Each successful training run produces an immutable version. Your application decides which version to publish.

IDUse
ftm_…Stable, organization-owned model family. New Sessions resolve its published version.
ftv_…Immutable version. Use it directly for reproducible evaluation and controlled rollout.
ftr_…Training run, including its frozen data selection, source and settings.

All three resources belong to the organization that created them. Knowing an ID does not grant another organization access. A model family without a published ready version cannot serve inference.

Create a model family

ts
const model = await rebyte.models.create({
  name: 'Order extraction',
  base_model: 'Qwen/Qwen3.6-35B-A3B',
  scenario_id: scenario.id,
}, { headers: { 'Idempotency-Key': 'orders-model-001' } });

Use the family's Scenario to review and select training data. A training run saves the starting source and allocates its output version ID at admission. It does not change the published version.

Inspect a candidate

ts
const version = await rebyte.models.versions.retrieve(model.id, run.version_id);
for await (const item of rebyte.models.versions.list(model.id)) {
  console.log(item.id, item.status, item.optimizer_steps, item.expires_at);
}

Version states are queued, training, verifying, ready, failed and cancelled. ready means the version passed a serving check. It is not a claim that its answers are better for your task. Inspect its source, settings, training progress, context limit, output limit and pricing.

A version has a finite lifetime. Check the returned expires_at before using it for inference or as the source of another run. Publishing does not extend that lifetime. An expired or unavailable version fails explicitly.

Evaluate on held-out work

Use the exact version ID for evaluation:

ts
const evaluation = await rebyte.sessions.create({
  scenario_id: scenario.id,
  agent: {
    model: run.version_id,
    instructions: 'Extract order facts as JSON.',
  },
  environment: { type: 'none' },
  input: 'Order B-210 contains 3 pens at $2 each. Return order_id and total.',
});

Review completed Turns and save feedback. Turns, feedback and traces retain the actual model_version_id, so later publication cannot change which version produced a result.

Keep evaluation Turns outside future training selections. Compare the same held-out tasks across versions and inspect errors, not only one success rate. Rebyte does not choose a winner or publish automatically.

Publish and roll back

ts
await rebyte.models.publish(model.id, { version_id: run.version_id });

// New Sessions can now use the stable family ID.
const session = await rebyte.sessions.create({
  agent: { model: model.id, instructions: 'Extract order facts as JSON.' },
  scenario_id: scenario.id,
  environment: { type: 'none' },
  input: 'Order C-310 contains 4 folders at $3 each. Return order_id and total.',
});
Terminal
curl --fail-with-body "https://api.rebyte.ai/v1/models/$MODEL_ID/publish" \
  -H "Authorization: Bearer $REBYTE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "$(jq -n --arg version "$VERSION_ID" '{version_id:$version}')"

Publication updates the family's current_version_id. New Sessions resolve it once and remain pinned for the conversation. Existing Sessions keep their original version, even if you publish or roll back later.

To roll back, publish an earlier owned, ready, unexpired version of the same family. To continue training, select that version as a new run's source. These are separate actions: rollback changes serving; a new training run creates a new experiment.

HTTP reference

Reads require tasks:read; writes require tasks:write. These extension routes need no OpenAI-Beta header. Lists use limit, order and after.

Method and pathPurpose
POST /v1/modelsCreate an organization-owned model family.
GET /v1/modelsList model families.
GET /v1/models/{model_id}Read the published version and family metadata.
GET /v1/models/{model_id}/versionsList immutable versions.
GET /v1/models/{model_id}/versions/{version_id}Inspect a version.
GET /v1/models/{model_id}/versions/{version_id}/statusRead current version progress.
POST /v1/models/{model_id}/publishPublish a ready version or roll back.

Create training through training runs. Model families and versions currently have no delete endpoint.