Skip to main content
Section ID: 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

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-modemodestring (COMPACTION_MODE_SYNC, COMPACTION_MODE_ASYNC) or integer (int32)Optional; explicit presenceSee meaning below.
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-thresholdthresholdThresholdConfigOptionalToken-count or context-window-percentage threshold that triggers compaction.
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-generationconfiggenerationConfigGenerationConfigOptionalSeparate config for compaction LLM calls.
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#request-field-preserverecentpreserveRecentstring (int64)OptionalMessages 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.

ValueNo.FormMeaning
COMPACTION_MODE_SYNC0CanonicalWait for compaction to finish before continuing the dependent operation.
COMPACTION_MODE_ASYNC1CanonicalStart 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).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-modeSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-modemodestring (COMPACTION_MODE_SYNC, COMPACTION_MODE_ASYNC) or integer (int32)Optional; explicit presenceSee meaning below.
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-thresholdSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-thresholdthresholdThresholdConfigOptionalToken-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-generationconfiggenerationConfigGenerationConfigOptionalSeparate config for compaction LLM calls.
Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#field-preserverecentSection ID: DOC-API-MODEL-schema-1hbvkcgu5m#response-field-preserverecentpreserveRecentstring (int64)OptionalMessages 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.

ValueNo.FormMeaning
COMPACTION_MODE_SYNC0CanonicalWait for compaction to finish before continuing the dependent operation.
COMPACTION_MODE_ASYNC1CanonicalStart compaction asynchronously and apply its result when it becomes available.

Where used​

Section ID: DOC-API-MODEL-schema-1hbvkcgu5m#where-used

ReferenceRelationship
Get full conversation statePOST /api/v1/llm/conversation-state
Update context management settingsPOST /api/v1/llm/update-context-management-settings
Create a new conversation threadPOST /api/v1/llm/create-thread
Models containing this value
ModelRelationship
ContextManagementSettingsNested in model
ContextManagementSettingsNested in model

Download the public reference contract.

Document ID: DOC-API-MODEL-schema-1hbvkcgu5m