DOC-API-MODEL-schema-1hbvkcgu5m#overview
CompactionConfig
Configuration for compaction strategy
Meaning and usage
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#meaning
See the definition above.
Usage profiles
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#fields
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-modemode | string (COMPACTION_MODE_SYNC, COMPACTION_MODE_ASYNC) or integer (int32) | Optional; explicit presence | See meaning below. |
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-thresholdthreshold | ThresholdConfig | Optional | Token-count or context-window-percentage threshold that triggers compaction. |
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-generationconfiggenerationConfig | GenerationConfig | Optional | Separate config for compaction LLM calls. |
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-preserverecentpreserveRecent | string (int64) | Optional | Messages to keep uncompacted. Pattern: ^-?\d+$. |
mode
Context compaction mode selected by the operation.
SYNC, ASYNC
Values of mode
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-values-mode
Whether context compaction blocks the triggering operation or proceeds asynchronously.
| Value | No. | Form | Meaning |
|---|---|---|---|
COMPACTION_MODE_SYNC | 0 | Canonical | Wait for compaction to finish before continuing the dependent operation. |
COMPACTION_MODE_ASYNC | 1 | Canonical | Start compaction asynchronously and apply its result when it becomes available. |
In responses
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#response
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-modeSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-modemode | string (COMPACTION_MODE_SYNC, COMPACTION_MODE_ASYNC) or integer (int32) | Optional; explicit presence | See meaning below. |
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-thresholdSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-thresholdthreshold | ThresholdConfig | Optional | Token-count or context-window-percentage threshold that triggers compaction. |
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-generationconfigSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-generationconfiggenerationConfig | GenerationConfig | Optional | Separate config for compaction LLM calls. |
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-preserverecentSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-preserverecentpreserveRecent | string (int64) | Optional | Messages to keep uncompacted. Pattern: ^-?\d+$. |
mode
Context compaction mode selected by the operation.
SYNC, ASYNC
Values of mode
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-values-mode
Whether context compaction blocks the triggering operation or proceeds asynchronously.
| Value | No. | Form | Meaning |
|---|---|---|---|
COMPACTION_MODE_SYNC | 0 | Canonical | Wait for compaction to finish before continuing the dependent operation. |
COMPACTION_MODE_ASYNC | 1 | Canonical | Start compaction asynchronously and apply its result when it becomes available. |
Where used
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#where-used
| Reference | Relationship |
|---|---|
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Update context management settings | POST /api/v1/llm/update-context-management-settings |
| Create a new conversation thread | POST /api/v1/llm/create-thread |
Models containing this value
| Model | Relationship |
|---|---|
| ContextManagementSettings | Nested in model |
| ContextManagementSettings | Nested in model |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-1hbvkcgu5m