NEAR AI Cloud: Deprecate a model in favor of another (Admin only)
/api-reference/openapi.json post /v1/admin/models/deprecate
Atomically marks modelId as deprecated and routes its traffic to
successorModelId:
- Adds
modelIdas an alias ofsuccessorModelId, so existing clients sendingmodel: "<modelId>"keep working — the alias resolver rewrites the request-sidemodelfield to the successor before backend dispatch, and the response'smodelfield reflects the canonical (successor) name. - Re-points any pre-existing inbound aliases of
modelIdat the successor, so historical aliases keep resolving. - Sets
modelId.isActive = falseso it is hidden from publicGET /v1/modelsand fromGET /v1/admin/modelsunlessinclude_inactive=true. - Records a
model_historyentry 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.