Responses

Post Compact Endpoint

Handle POST /v1/responses/compact.

Loads the chain anchored at previous_response_id, asks the inference backend (via the same scheduler used by /v1/responses) to summarise it using the fixed summarisation prompt, persists the result via CompactionPort, and returns the synthetic CompactedResponse.

Per the ADR: 404 on ownership/missing, 413 on > 10 MiB output, 502/504 on backend failure, 501 when compaction storage is not configured. target_size_pct is resolved here from ContextConfig so the domain service stays free of application-layer imports.

post/v1/responses/compact

Request

Request body

previous_response_idstring required

Response

Successful Response

idstring required
created_atinteger required

Unix epoch seconds.

object'response.compaction'

Changes

No recorded changes to this operation across all 1 revision of this API.