feat(FN-3901): add builtin research web-search provider as default
The merge adds a builtin web-search research provider as the default, replacing the need for external research provider configuration and removing the setup gate for builtin defaults. Dashboard settings UX for research defaults was aligned (ResearchView, SettingsModal), CLI research commands were up Fusion-Task-Id: FN-3901
This commit is contained in:
@@ -1445,6 +1445,31 @@ describe("fn pi extension (runnable structured-output regression slice)", () =>
|
||||
});
|
||||
|
||||
describe("research tools", () => {
|
||||
it("fn_research_run treats builtin as configured when no provider is explicitly set", async () => {
|
||||
const store = new TaskStore(tmpDir);
|
||||
await store.init();
|
||||
await store.updateGlobalSettings({
|
||||
researchGlobalEnabled: true,
|
||||
experimentalFeatures: { researchView: true } as Record<string, boolean>,
|
||||
});
|
||||
await store.updateSettings({
|
||||
researchEnabled: true,
|
||||
researchSettings: { enabled: true },
|
||||
});
|
||||
|
||||
const tool = api.tools.get("fn_research_run")!;
|
||||
const result = await tool.execute(
|
||||
"research-run-builtin",
|
||||
{ query: "builtin default" },
|
||||
undefined,
|
||||
undefined,
|
||||
makeCtx(tmpDir),
|
||||
);
|
||||
|
||||
expect(result.details.setup).toBeNull();
|
||||
expect(result.details.status).toBe("queued");
|
||||
});
|
||||
|
||||
it("fn_research_list status parameter matches RESEARCH_RUN_STATUSES", () => {
|
||||
const tool = api.tools.get("fn_research_list") as any;
|
||||
const statusSchema = tool.parameters.properties.status;
|
||||
|
||||
@@ -88,6 +88,24 @@ describe("research extension tools", () => {
|
||||
expect(retryResult.details.setup.code).toBe("feature-disabled");
|
||||
});
|
||||
|
||||
it("treats builtin as configured when no provider is explicitly set", async () => {
|
||||
const store = new TaskStore(tmpDir);
|
||||
await store.init();
|
||||
await store.updateGlobalSettings({
|
||||
experimentalFeatures: { researchView: true } as Record<string, boolean>,
|
||||
researchGlobalEnabled: true,
|
||||
});
|
||||
await store.updateSettings({
|
||||
researchSettings: { enabled: true },
|
||||
});
|
||||
|
||||
const runTool = api.tools.get("fn_research_run")!;
|
||||
const result = await runTool.execute("call-builtin", { query: "fusion" }, undefined, undefined, makeCtx(tmpDir));
|
||||
|
||||
expect(result.details.setup).toBeNull();
|
||||
expect(result.details.status).toBe("queued");
|
||||
});
|
||||
|
||||
it("returns actionable missing-credentials response", async () => {
|
||||
const store = new TaskStore(tmpDir);
|
||||
await store.init();
|
||||
|
||||
Reference in New Issue
Block a user