document/content/self-host/upgrading/4-16/4162.en.mdx
V4.16.2 removes PARSE_FILE_WORKERS, PARSE_FILE_WORKER_MEMORY_LIMIT_MB, HTML_TO_MARKDOWN_WORKERS, and TEXT_TO_CHUNKS_WORKERS. When upgrading, remove these variables from your .env file or the Docker Compose environment section. No replacement variables are required.
The hard limit for file parsing Workers is now set automatically based on the available CPU parallelism detected by Node.js. This accounts for container CPU quotas and process affinity and always allows at least one Worker. The number of tasks that can run concurrently is further constrained by the file parsing memory scheduler.
The hard limit for HTML-to-Markdown and text-chunking Workers is the smaller of the available CPU parallelism and 5. Before starting a task, FastGPT checks whether schedulable memory remains outside the system safety reserve. If no memory is available, the task stays queued. FastGPT retries immediately when another task finishes, then checks every 30 seconds if memory is still insufficient, for up to 30 minutes. Workers that remain idle for more than 60 seconds are reclaimed automatically, with at most one retained long-term.
This release first removes invalid resource permissions, then materializes complete effective ACLs for Apps, Datasets, and Agent Skills. After upgrading, run a dry run first. A dry run does not delete or write permission data. It processes all teams by default, or you can pass teamId to target a single team.
curl -X POST 'https://δ½ ηεε/api/admin/4162/initPermission' \
-H 'Content-Type: application/json' \
-H 'rootkey: δ½ ηROOT_KEY' \
-d '{"dryRun":true,"teamConcurrency":100}'
After confirming that migration.errors is empty or that all affected resources have been fixed, run the cleanup and migration:
curl -X POST 'https://δ½ ηεε/api/admin/4162/initPermission' \
-H 'Content-Type: application/json' \
-H 'rootkey: δ½ ηROOT_KEY' \
-d '{"dryRun":false,"teamConcurrency":100}'
teamConcurrency controls how many teams are processed concurrently during ACL migration. It accepts values from 1 to 1000 and defaults to 100. Apps, Datasets, and Agent Skills are processed sequentially within each team. If one resource type fails for a team, FastGPT records the error in migration.errors and continues processing the remaining resource types and teams. sampleLimit controls the number of invalid permission samples returned in cleanup.samples. The response contains cleanup and migration: cleanup reports scan, match, and deletion statistics; migration.resourceCount is the number of scanned resources; migration.updatedResourceCount is the number of resources requiring writes; migration.skippedResourceCount is the number of target resources skipped because of missing parents or invalid trees; and migration.errors contains error details. The migration preserves each resource's owner and child-specific permissions. Parent resource chains are loaded on demand, and historical resources with a missing inheritance flag are treated as inheriting permissions.
During a dry run, the migration preview uses the current permission data before cleanup. If cleanup finds invalid permissions, the migration statistics from the apply run may differ after those permissions are removed.
The cleanup and migration are safe to run repeatedly. After applying them, run another dry run and confirm that cleanup.danglingPermissionCount, migration.updatedResourceCount, and migration.errors are all 0. If migration.errors contains entries, repair the data using the resource type, resource ID, and parent ID in the error details, then retry.
If Milvus is your current vector store, upgrade Milvus to 2.5.16 or later before upgrading FastGPT. V4.16.2 automatically switches full-text search to Milvus BM25 and stores vectors and full-text data in the new modeldata_v2 collection. FastGPT terminates during startup if the Milvus version is too old, the version cannot be identified, or the BM25 capability check fails. It does not fall back to MongoDB full-text search.
For an existing Milvus deployment, verify that the old vector data is still available:
modeldata collection exists and contains data, call GET /api/admin/4162/milvus to merge the old vectors with index text from MongoDB into modeldata_v2. This does not regenerate embeddings.$text.Follow Milvus BM25 full-text search configuration and migration for backups, the Milvus image upgrade, dry runs, resumable migration, validation, old-collection cleanup, and rollback.
modeldata_v2 design when Milvus is the vector store.name and description as structured fields and allowing description to be empty.nodeResponse, toolResponse, and streaming events.pluginOutput.error from personal Workflow Tools remains a business field.read_files tool Node and preserved page-count details. Propagated usageId through external-file and API-file Dataset parsing so charges are attributed correctly.valueType is empty or null in historical App Variables. FastGPT now derives valueType from the Variable input type when loading or saving chat configuration, falls back to any when the type cannot be mapped or the value is invalid, and runs Zod validation before saving. Existing data does not require an additional cleanup script.type: object parameters.FileSource and materialized file content only after a Worker acquires a run slot and its initial resource reservation: