Collections a part of the tree answers from when a request names none

On an organization, team, project or key, the narrowest winning: llmgw ctl
kb default, POST /api/v1/kb/defaults, and the console's Knowledge screen. A
request's own X-Llmgw-Knowledge overrides it and none turns it off. A default
never refuses a request: a collection the caller cannot read is left out, and
a failed search answers without passages. Removing a collection takes it out
of every default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-08 15:52:43 +02:00
1 parent 54ba04c52a
commit 0093cc3d45
16 files changed
+552 -12

No files matched your search

+93
View File
@@ -1275,6 +1275,49 @@
}
}
},
"/api/v1/kb/defaults": {
"post": {
"operationId": "postKbDefaults",
"summary": "Set the collections a part of the tree answers from when a request names none",
"description": "On an organization, team, project or key; the narrowest one with a default wins. No collections clears it. A request's own X-Llmgw-Knowledge overrides it, and X-Llmgw-Knowledge: none turns it off.",
"tags": [
"kb"
],
"parameters": [
{
"$ref": "#/components/parameters/Actor"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/KBDefaultRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/KBDefaultView"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/api/v1/kb/grants": {
"post": {
"operationId": "postKbGrants",
@@ -5016,6 +5059,49 @@
}
}
},
"KBDefaultRequest": {
"type": "object",
"description": "KBDefaultRequest sets the collections a part of the tree answers from when a request names none; none clears it.",
"properties": {
"target": {
"type": "string",
"description": "Target is org:, team:, project: (by path or ID) or key:KEY-ID."
},
"collections": {
"type": "array",
"items": {
"type": "string"
},
"description": "Collections are IDs, names when unique, or ORG/NAME."
}
}
},
"KBDefaultView": {
"type": "object",
"description": "KBDefaultView is one part of the tree's default collections.",
"properties": {
"target": {
"type": "string"
},
"name": {
"type": "string"
},
"collections": {
"type": "array",
"items": {
"type": "string"
},
"description": "Collections are ORG/NAME, in order."
},
"at": {
"type": "string",
"format": "date-time"
},
"by": {
"type": "string"
}
}
},
"KBDocumentView": {
"type": "object",
"description": "KBDocumentView is one document in a collection.",
@@ -5131,6 +5217,13 @@
"items": {
"$ref": "#/components/schemas/KBCollectionView"
}
},
"defaults": {
"type": "array",
"items": {
"$ref": "#/components/schemas/KBDefaultView"
},
"description": "Defaults are the collections parts of the tree answer from when a request names none."
}
}
},