fix(gateway): keep attachment capability reads prepared

This commit is contained in:
joshavant
2026-08-12 16:02:26 -05:00
parent 1b387cad5d
commit 47f8cd1796
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -407,9 +407,11 @@ export async function resolveGatewayModelSupportsImages(params: {
}
try {
// Attachment admission is a turn hot path. Consume lifecycle-prepared capabilities so a
// user send never starts full provider discovery before it can be acknowledged.
const loadParams = {
...(params.agentId ? { agentId: params.agentId } : {}),
readOnly: false,
readOnly: true,
};
const snapshot = params.loadGatewayModelCatalogSnapshot
? await params.loadGatewayModelCatalogSnapshot(loadParams)
+1 -1
View File
@@ -3650,7 +3650,7 @@ describe("resolveGatewayModelSupportsImages", () => {
).resolves.toBe(true);
expect(loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith({
agentId: "qa",
readOnly: false,
readOnly: true,
});
expect(loadGatewayModelCatalog).not.toHaveBeenCalled();
});