ModelCompletedParams
model/completed params. text, stopReason, modelId and
usage ride completed (usage only when the provider reported counts);
message rides failed; cancelled and timedOut carry neither. The
struct marks the conditional members optional; the SS prose pins the
per-outcome rule. text is untrusted model output.
Fields and variants
Section titled “Fields and variants”commandIdmessagemodelIdoutcomestopReasontextusage
Source
schema/msp/experimental/msp.schema.json#/types/ModelCompletedParams
{ "description": "`model/completed` params. `text`, `stopReason`, `modelId` and\n`usage` ride `completed` (`usage` only when the provider reported counts);\n`message` rides `failed`; `cancelled` and `timedOut` carry neither. The\nstruct marks the conditional members optional; the SS prose pins the\nper-outcome rule. `text` is untrusted model output.", "properties": { "commandId": { "description": "The request's id — the correlation key.", "type": "string" }, "message": { "description": "Why the call failed, in words (on `failed`).", "type": "string" }, "modelId": { "description": "The `model/list` id of the model that ran (on `completed`).", "type": "string" }, "outcome": { "$ref": "#/$defs/ModelCompleteOutcome", "description": "How the call settled." }, "stopReason": { "$ref": "#/$defs/ModelCompleteStopReason", "description": "Why the model stopped (on `completed`)." }, "text": { "description": "The model's answer, verbatim (on `completed`).", "type": "string" }, "usage": { "$ref": "#/$defs/ModelCompleteUsage", "description": "The provider's counts (on `completed`, when it reported them)." } }, "required": [ "commandId", "outcome" ], "type": "object"}