Skip to main content

List complete durable model invocations

GET 

/session/model-runs

Lists the session's model runs, newest first. A model run is one logical request Peen made to a model: a root turn's conversation with the model, a child agent's, or a compaction summary. One run can take several provider rounds, one per model call in a tool loop, and each round is listed by GET /session/model-runs/{modelRunId}/calls. Peen writes the run before any provider work starts and finalizes it when the run ends.

A run records the model it asked for and the model that answered, the settings in effect without secrets, the final text and thinking, the response messages, the summed usage, the cost amounts when the model has prices, and failure details.

  • Ordering: by startedAt descending, then id descending.
  • Paging: limit (1 to 200, default 50) and offset (default 0). hasMore is true when at least one more run exists after this page.
  • Filters: stage and state, which combine.
  • Errors: 400 VALIDATION_FAILED for a limit, offset, stage or state outside the allowed values. 404 SESSION_NOT_FOUND when no session has the X-Session-ID ID.

Request​

Responses​

One page of the session's model runs, newest first.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.