Skip to content

Commit ba12044

Browse files
committed
LCORE-1569,LCORE-1570: regenerate docs/openapi.json for new config fields
The CI `spectral` job verifies that the committed docs/openapi.json matches what `scripts/generate_openapi_schema.py` produces from the live Pydantic models. The new `compaction` field on Configuration (LCORE-1570) and the new `context_windows` field on InferenceConfiguration (LCORE-1569) added schema entries that were missing from the committed JSON, so the CI diff check failed. Regenerated via `uv run scripts/generate_openapi_schema.py docs/openapi.json`. The diff only adds the new schemas (CompactionConfiguration definition, compaction property on Configuration, context_windows property on InferenceConfiguration); no existing schema is altered. Caught only after pushing — `make verify` runs the spectral ruleset against docs/openapi.json but does not run the matches- generator check, so the local pre-push pass was clean.
1 parent 361718e commit ba12044

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

docs/openapi.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11898,6 +11898,46 @@
1189811898
"title": "ClientCredentialsOAuthFlow",
1189911899
"description": "Defines configuration details for the OAuth 2.0 Client Credentials flow."
1190011900
},
11901+
"CompactionConfiguration": {
11902+
"properties": {
11903+
"enabled": {
11904+
"type": "boolean",
11905+
"title": "Enable compaction",
11906+
"description": "When true, older conversation turns are summarized when estimated tokens approach the context window limit.",
11907+
"default": false
11908+
},
11909+
"threshold_ratio": {
11910+
"type": "number",
11911+
"title": "Threshold ratio",
11912+
"description": "Trigger compaction when estimated tokens exceed this fraction of the model's context window (0.0-1.0).",
11913+
"default": 0.7
11914+
},
11915+
"token_floor": {
11916+
"type": "integer",
11917+
"minimum": 0.0,
11918+
"title": "Token floor",
11919+
"description": "Minimum token count before compaction can trigger. Prevents triggering on very small context windows.",
11920+
"default": 4096
11921+
},
11922+
"buffer_turns": {
11923+
"type": "integer",
11924+
"minimum": 0.0,
11925+
"title": "Buffer turns",
11926+
"description": "Number of recent turns to keep verbatim.",
11927+
"default": 4
11928+
},
11929+
"buffer_max_ratio": {
11930+
"type": "number",
11931+
"title": "Buffer max ratio",
11932+
"description": "Maximum fraction of context window the buffer zone can occupy, regardless of buffer_turns.",
11933+
"default": 0.3
11934+
}
11935+
},
11936+
"additionalProperties": false,
11937+
"type": "object",
11938+
"title": "CompactionConfiguration",
11939+
"description": "Configuration for conversation history compaction.\n\nCompaction summarizes older conversation turns when their estimated\ntoken count approaches the context window limit, keeping the\nconversation usable instead of failing with HTTP 413. The\nconfiguration here controls when compaction triggers and how much\nrecent context is preserved verbatim.\n\nAttributes:\n enabled: Master switch. When False, compaction never triggers\n and other fields are inert.\n threshold_ratio: Trigger compaction when estimated input tokens\n exceed this fraction of the model's context window\n (clamped to 0.0..1.0).\n token_floor: Minimum estimated token count before compaction\n can trigger, regardless of threshold_ratio. Prevents\n triggering on very small context windows.\n buffer_turns: Initial number of recent turns to keep verbatim.\n The runtime applies a degrading guard \u2014 if these turns\n exceed the available budget, it reduces buffer_turns by\n one repeatedly until the budget fits, down to zero.\n buffer_max_ratio: Hard cap on the fraction of the context\n window the buffer zone may occupy, regardless of\n buffer_turns."
11940+
},
1190111941
"Configuration": {
1190211942
"properties": {
1190311943
"name": {
@@ -11971,6 +12011,11 @@
1197112011
"$ref": "#/components/schemas/ConversationHistoryConfiguration",
1197212012
"title": "Conversation history configuration"
1197312013
},
12014+
"compaction": {
12015+
"$ref": "#/components/schemas/CompactionConfiguration",
12016+
"title": "Conversation compaction configuration",
12017+
"description": "Controls when conversation history is summarized to keep the model's input below the context window limit. Disabled by default \u2014 when disabled, requests that exceed the window continue to surface as HTTP 413."
12018+
},
1197412019
"byok_rag": {
1197512020
"items": {
1197612021
"$ref": "#/components/schemas/ByokRag"
@@ -13391,6 +13436,15 @@
1339113436
],
1339213437
"title": "Default provider",
1339313438
"description": "Identification of default provider used when no other model is specified."
13439+
},
13440+
"context_windows": {
13441+
"additionalProperties": {
13442+
"type": "integer",
13443+
"exclusiveMinimum": 0.0
13444+
},
13445+
"type": "object",
13446+
"title": "Per-model context window sizes (tokens)",
13447+
"description": "Map of fully-qualified model identifier (e.g., \"openai/gpt-4o-mini\") to context window size in tokens. Used by the conversation compaction trigger to decide when older turns must be summarized before the input exceeds the window. Models absent from this map have no registered window \u2014 callers fall back to their own default or skip the token-based trigger."
1339413448
}
1339513449
},
1339613450
"additionalProperties": false,

0 commit comments

Comments
 (0)