import { describe, expect, it } from "vitest"; import {
buildEmptyExplicitToolAllowlistError,
collectExplicitToolAllowlistSources,
} from "./tool-allowlist-guard.js";
expect(error?.message).toContain("runtime toolsAllow: query_db");
expect(error?.message).toContain("tools are disabled for this run");
});
it("fails closed when the selected model cannot use requested tools", () => { const error = buildEmptyExplicitToolAllowlistError({
sources: [{ label: "agents.db.tools.allow", entries: ["query_db"] }],
callableToolNames: [],
toolsEnabled: false,
});
expect(error?.message).toContain("agents.db.tools.allow: query_db");
expect(error?.message).toContain("the selected model does not support tools");
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.