Fixing "Document Too Large" Errors from Workspace
If you see a "document too large" error when running inference from workspace.locai.co.uk, this page explains what caused it, how to resolve it, and why new deployments are unaffected.
What happened
A configuration issue meant that inference requests made from workspace.locai.co.uk were incorrectly blocked before they reached your model. The error message displayed, "document too large", was misleading; the real cause was a browser security check (CORS preflight) failing because the Workspace origin was not on the approved list baked into your model's serving pipeline.
This has been corrected. Newly deployed or redeployed models work with Workspace automatically.
Who is affected
- Users running inference from Workspace against models that were already deployed before 31 July 2026.
- Models deployed after 31 July 2026 are unaffected; they pick up the correct configuration automatically.
Already-running models keep their old configuration until they are repaired or redeployed. There is no automatic fix for existing deployments; one of the two steps below is needed per model, per device.
Option 1: Redeploy the model
The simplest fix: redeploy your model from the Models page in Locai Control. A fresh deployment always picks up the latest configuration.
Option 2: Repair via the API
To fix an already-running deployment in place, without a full redeploy, use the repair endpoint:
POST /api/v1/models/{model_id}/repair-serving/{device_id}
Path parameters
| Parameter | Description |
|---|---|
model_id | The ID of the model to repair. |
device_id | The ID of the device running the model. |
Optional query parameter
| Parameter | Description |
|---|---|
port | Pin the serving port (integer, 1 to 65535). Omit to keep the current port. |
Request body: none
Authentication: Bearer token required. You must own both the device and the model, or the model must be globally shared. The device must be online at the time of the request.
Example request
curl -X POST \
"https://api.locai.co.uk/api/v1/models/mdl_abc123/repair-serving/dev_xyz789" \
-H "Authorization: Bearer <your_token>"
The repair command is sent to your device and expires after 24 hours if not acknowledged. It restarts the model's serving pipeline with the corrected configuration on the same port, so once your device processes the command, inference from Workspace works normally.
Frequently asked questions
Will this affect my model's performance or settings? No. The repair only updates the serving pipeline's origin allowlist. Your model weights, parameters, and runtime configuration are unchanged.
My device is offline. Can I still repair? No. The device must be online to receive the repair command. Bring your device online and then retry the repair.
How do I know the repair worked? Once the device acknowledges the command, retry your inference request from Workspace. The error should no longer appear.