mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(gateway): keep attachment capability reads prepared
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -3650,7 +3650,7 @@ describe("resolveGatewayModelSupportsImages", () => {
|
||||
).resolves.toBe(true);
|
||||
expect(loadGatewayModelCatalogSnapshot).toHaveBeenCalledWith({
|
||||
agentId: "qa",
|
||||
readOnly: false,
|
||||
readOnly: true,
|
||||
});
|
||||
expect(loadGatewayModelCatalog).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user