From 421cf2c5eee305054f7a9554a6877ee75feaa57b Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Fri, 17 Apr 2026 09:48:38 +0200 Subject: [PATCH 1/2] feat(aiPlatformConfiguration): add contextMemory tuning block Expose T0 user-preference memory retrieval limits (tokenBudget, maxItems) via aiPlatformConfiguration.contextMemory so deployments can tune the block that Collate ships to the AI Platform via the gRPC user_memory_context field without code changes. Both fields default to the values previously hard-coded in Collate's ContextMemoryRetrievalService (500 tokens, 5 items), so existing deployments behave identically. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../aiPlatformConfiguration.json | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/openmetadata-spec/src/main/resources/json/schema/configuration/aiPlatformConfiguration.json b/openmetadata-spec/src/main/resources/json/schema/configuration/aiPlatformConfiguration.json index 61335f37062a..0f9b95df4fa6 100644 --- a/openmetadata-spec/src/main/resources/json/schema/configuration/aiPlatformConfiguration.json +++ b/openmetadata-spec/src/main/resources/json/schema/configuration/aiPlatformConfiguration.json @@ -28,6 +28,26 @@ } }, "required": ["port"] + }, + "contextMemoryConfiguration": { + "description": "Tuning for the Context Memory T0 (user preferences) block shipped to the AI Platform via the gRPC user_memory_context field.", + "javaType": "org.openmetadata.schema.configuration.ContextMemoryConfiguration", + "type": "object", + "properties": { + "tokenBudget": { + "description": "Maximum number of tokens worth of T0 user-preference memories to include. Memories are ranked by freshness + usage and filled in order until the budget or item cap is reached.", + "type": "integer", + "default": 500, + "minimum": 0 + }, + "maxItems": { + "description": "Maximum number of T0 user-preference memories to include regardless of token budget.", + "type": "integer", + "default": 5, + "minimum": 0 + } + }, + "additionalProperties": false } }, "properties": { @@ -59,6 +79,10 @@ "grpc": { "description": "gRPC configuration for the AI Platform server", "$ref": "#/definitions/grpcConfiguration" + }, + "contextMemory": { + "description": "Context Memory tuning for the T0 user-preference block assembled by Collate and shipped to the AI Platform.", + "$ref": "#/definitions/contextMemoryConfiguration" } }, "required": ["host", "port", "grpc"], From 5532fbd07bad8f18f6c1855af450f5585421fc8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Apr 2026 07:52:35 +0000 Subject: [PATCH 2/2] Update generated TypeScript types --- .../configuration/aiPlatformConfiguration.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/configuration/aiPlatformConfiguration.ts b/openmetadata-ui/src/main/resources/ui/src/generated/configuration/aiPlatformConfiguration.ts index 4fd103fdf835..2f6a178db988 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/configuration/aiPlatformConfiguration.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/configuration/aiPlatformConfiguration.ts @@ -14,6 +14,11 @@ * This schema defines the JWT Configuration. */ export interface AIPlatformConfiguration { + /** + * Context Memory tuning for the T0 user-preference block assembled by Collate and shipped + * to the AI Platform. + */ + contextMemory?: ContextMemoryConfiguration; /** * Indicates whether the AI Platform is enabled */ @@ -44,6 +49,25 @@ export interface AIPlatformConfiguration { trustedCertsPath?: string; } +/** + * Context Memory tuning for the T0 user-preference block assembled by Collate and shipped + * to the AI Platform. + * + * Tuning for the Context Memory T0 (user preferences) block shipped to the AI Platform via + * the gRPC user_memory_context field. + */ +export interface ContextMemoryConfiguration { + /** + * Maximum number of T0 user-preference memories to include regardless of token budget. + */ + maxItems?: number; + /** + * Maximum number of tokens worth of T0 user-preference memories to include. Memories are + * ranked by freshness + usage and filled in order until the budget or item cap is reached. + */ + tokenBudget?: number; +} + /** * gRPC configuration for the AI Platform server */