Overview
This document covers the required migration and cleanup steps for FastGPT 4.15.06 self-hosted deployments. This release updates Skill Edit chat storage to the standard Chat model, and requires resolving legacy Skill Debug chat data and backfilling missing ownership fields for sandbox instances. Post-upgrade, new Skill Edit chats will not access legacy records, but running the dedicated migration API standardizes sandbox instance metadata and removes outdated debug chat data. Before executing the migration, confirm new Chat source indexes have been created for your deployment.
Migration API Reference
This exclusive upgrade endpoint is not exposed as a public OpenAPI endpoint. Replace your-domain and YOUR_ROOT_KEY with your deployment’s domain and root key when running commands.
The API accepts one parameter, detailed below:
| Parameter | Type | Default | Description |
|---|---|---|---|
dryRun | boolean | true | Whether to only report matched data without executing changes. |
First, run a dry-run to preview matched records:
curl -X POST 'https://your-domain/api/admin/4150/init4150-beta6' \
-H 'Content-Type: application/json' \
-H 'rootkey: YOUR_ROOT_KEY' \
-d '{"dryRun":true}'After verifying the dry-run results, run the full migration and cleanup by setting dryRun to false:
curl -X POST 'https://your-domain/api/admin/4150/init4150-beta6' \
-H 'Content-Type: application/json' \
-H 'rootkey: YOUR_ROOT_KEY' \
-d '{"dryRun":false}'Migration Logic Details
The migration follows a fixed set of rules to ensure data integrity:
- Scan all
_idvalues from theskillsMongoDB collection. - For
agent_sandbox_instancesmissingsourceTypeorsourceId, update records matchingappId=skillIdormetadata.skillId=skillIdwithsourceType=skillEditandsourceId=skillId, then remove the legacyappIdandmetadata.skillIdfields. - For remaining sandbox instances still missing valid
sourceType/sourceId, with a non-emptyappIdnot linked to any Skill, update tosourceType=appandsourceId=appId, then remove legacy fields. - Sandbox instances with existing valid
sourceType/sourceIdwill only have their legacyappId/metadata.skillIdfields removed; existing standard ownership fields are not overwritten. - In non-dry-run mode, delete orphaned sandbox instances with no
appId, nullappId, emptyappId, or no linked Skill viametadata.skillId. This removal includes remote sandboxes, OpenSandbox volumes, S3 archives, and MongoDB records. Dry-run mode only reports these viaorphanMatchedCount. - Clean up legacy Skill Debug chats: first remove Skill IDs present in the
appscollection, then delete legacy entries from thechats,chatitems, andchat_item_responsescollections, plus legacy-format Chat S3 prefixes for remaining Skill IDs.
Important notes: This endpoint does not backfill sourceType for existing App Chat records, and scans the full skills collection. Partial Skill list scans are not supported, as this could incorrectly mark unscanned Skill sandboxes as App sandboxes.
Source: FastGPT official source
Applicability and version scope
Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.
Safety guardrails
Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.
Rollback guidance
Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.