Skip to content

Commit e3d5106

Browse files
pmbrullclaudegithub-actions[bot]
committed
feat(aiPlatformConfiguration): add contextMemory tuning block (#27455)
* 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) <noreply@anthropic.com> * Update generated TypeScript types --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3a376cd commit e3d5106

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

openmetadata-spec/src/main/resources/json/schema/configuration/aiPlatformConfiguration.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,26 @@
2828
}
2929
},
3030
"required": ["port"]
31+
},
32+
"contextMemoryConfiguration": {
33+
"description": "Tuning for the Context Memory T0 (user preferences) block shipped to the AI Platform via the gRPC user_memory_context field.",
34+
"javaType": "org.openmetadata.schema.configuration.ContextMemoryConfiguration",
35+
"type": "object",
36+
"properties": {
37+
"tokenBudget": {
38+
"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.",
39+
"type": "integer",
40+
"default": 500,
41+
"minimum": 0
42+
},
43+
"maxItems": {
44+
"description": "Maximum number of T0 user-preference memories to include regardless of token budget.",
45+
"type": "integer",
46+
"default": 5,
47+
"minimum": 0
48+
}
49+
},
50+
"additionalProperties": false
3151
}
3252
},
3353
"properties": {
@@ -59,6 +79,10 @@
5979
"grpc": {
6080
"description": "gRPC configuration for the AI Platform server",
6181
"$ref": "#/definitions/grpcConfiguration"
82+
},
83+
"contextMemory": {
84+
"description": "Context Memory tuning for the T0 user-preference block assembled by Collate and shipped to the AI Platform.",
85+
"$ref": "#/definitions/contextMemoryConfiguration"
6286
}
6387
},
6488
"required": ["host", "port", "grpc"],

openmetadata-ui/src/main/resources/ui/src/generated/configuration/aiPlatformConfiguration.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
* This schema defines the JWT Configuration.
1515
*/
1616
export interface AIPlatformConfiguration {
17+
/**
18+
* Context Memory tuning for the T0 user-preference block assembled by Collate and shipped
19+
* to the AI Platform.
20+
*/
21+
contextMemory?: ContextMemoryConfiguration;
1722
/**
1823
* Indicates whether the AI Platform is enabled
1924
*/
@@ -44,6 +49,25 @@ export interface AIPlatformConfiguration {
4449
trustedCertsPath?: string;
4550
}
4651

52+
/**
53+
* Context Memory tuning for the T0 user-preference block assembled by Collate and shipped
54+
* to the AI Platform.
55+
*
56+
* Tuning for the Context Memory T0 (user preferences) block shipped to the AI Platform via
57+
* the gRPC user_memory_context field.
58+
*/
59+
export interface ContextMemoryConfiguration {
60+
/**
61+
* Maximum number of T0 user-preference memories to include regardless of token budget.
62+
*/
63+
maxItems?: number;
64+
/**
65+
* Maximum number of tokens worth of T0 user-preference memories to include. Memories are
66+
* ranked by freshness + usage and filled in order until the budget or item cap is reached.
67+
*/
68+
tokenBudget?: number;
69+
}
70+
4771
/**
4872
* gRPC configuration for the AI Platform server
4973
*/

0 commit comments

Comments
 (0)