fix(tools): enable web_fetch by default
This commit is contained in:
23
src/agents/tools/web-tools.enabled-defaults.test.ts
Normal file
23
src/agents/tools/web-tools.enabled-defaults.test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { createWebFetchTool, createWebSearchTool } from "./web-tools.js";
|
||||
|
||||
describe("web tools defaults", () => {
|
||||
it("enables web_fetch by default (non-sandbox)", () => {
|
||||
const tool = createWebFetchTool({ config: {}, sandboxed: false });
|
||||
expect(tool?.name).toBe("web_fetch");
|
||||
});
|
||||
|
||||
it("disables web_fetch when explicitly disabled", () => {
|
||||
const tool = createWebFetchTool({
|
||||
config: { tools: { web: { fetch: { enabled: false } } } },
|
||||
sandboxed: false,
|
||||
});
|
||||
expect(tool).toBeNull();
|
||||
});
|
||||
|
||||
it("enables web_search by default", () => {
|
||||
const tool = createWebSearchTool({ config: {}, sandboxed: false });
|
||||
expect(tool?.name).toBe("web_search");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user