Skip to content
Developer Preview

model/completed

A model/complete call settled exactly once: completed, failed, cancelled or timedOut, to the requesting connection only.

Type: 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.

Field Type Stability Presence Description
commandId string required The request’s id — the correlation key.
message string optional Why the call failed, in words (on failed).
modelId string optional The model/list id of the model that ran (on completed).
outcome ModelCompleteOutcome required How the call settled.
stopReason ModelCompleteStopReason optional Why the model stopped (on completed).
text string optional The model’s answer, verbatim (on completed).
usage ModelCompleteUsage optional The provider’s counts (on completed, when it reported them).
Source

schema/msp/experimental/msp.schema.json#/notifications/model~2Fcompleted

{
"description": "A model/complete call settled exactly once: `completed`, `failed`, `cancelled` or `timedOut`, to the requesting connection only.",
"params": {
"$ref": "#/$defs/ModelCompletedParams"
}
}