document/content/self-host/upgrading/4-16/41602.en.mdx
v4.16.0-beta2v4.16.0-beta2This release applies strict schemas when system models are initialized or saved. Numeric strings, serialized price tiers, and missing fields saved by earlier releases may fail initialization validation. After upgrading, run a dry run first to inspect the model configurations that require cleanup. A dry run does not modify data or reload the model cache:
curl -X POST 'https://δ½ ηεε/api/admin/dataClean/cleanSystemModelConfigs' \
-H 'Content-Type: application/json' \
-H 'rootkey: δ½ ηROOT_KEY' \
-d '{"dryRun":true}'
After confirming that invalidSamples contains no records that require manual correction, run the cleanup:
curl -X POST 'https://δ½ ηεε/api/admin/dataClean/cleanSystemModelConfigs' \
-H 'Content-Type: application/json' \
-H 'rootkey: δ½ ηROOT_KEY' \
-d '{"dryRun":false}'
The cleanup converts valid numeric strings to numbers, converts serialized priceTiers values to arrays, and removes invalid optional numeric fields. Invalid or missing required numeric fields use system defaults: LLM maxContext/maxResponse/quoteMaxToken default to 16000/16000/13000, Embedding defaultToken/maxToken default to 500/3000, and price fields default to 0. functionCall remains optional, and a missing Embedding weight defaults to 0.
The cleanup writes the updated data consistently and immediately reloads the system model cache. The runtime cache is rebuilt even when no database record needs an update. The endpoint is safe to run repeatedly; a follow-up dry run should report wouldUpdate as 0. Records that still fail the complete current model schema are not written, and all of them are listed in invalidSamples.
%, #, ?, or slashes.account/* pages.