Skip to content
by Unity Nodes
docs.near.aiapi reference › admin › deprecate a model in favor of another admin only

NEAR AI Cloud: Deprecate a model in favor of another (Admin only)

Updated 02-11-2026

/api-reference/openapi.json post /v1/admin/models/deprecate Atomically marks modelId as deprecated and routes its traffic to successorModelId:

  1. Adds modelId as an alias of successorModelId, so existing clients sending model: "<modelId>" keep working — the alias resolver rewrites the request-side model field to the successor before backend dispatch, and the response's model field reflects the canonical (successor) name.
  2. Re-points any pre-existing inbound aliases of modelId at the successor, so historical aliases keep resolving.
  3. Sets modelId.isActive = false so it is hidden from public GET /v1/models and from GET /v1/admin/models unless include_inactive=true.
  4. Records a model_history entry for audit purposes.

All steps run in a single DB transaction. If the successor is inactive or either model is missing, returns 404 without modifying state.