feat: add Firecrawl provider support

This commit is contained in:
pi
2026-04-12 02:53:10 +01:00
parent 01d4411903
commit 98a966cade
20 changed files with 1570 additions and 366 deletions

View File

@@ -27,7 +27,17 @@ test("formatSearchOutput shows answer and fallback provider metadata", () => {
answer: "pi is a coding agent",
execution: {
actualProviderName: "exa-fallback",
failoverFromProviderName: "tavily-main",
attempts: [
{
providerName: "firecrawl-main",
status: "failed",
reason: "503 upstream unavailable",
},
{
providerName: "exa-fallback",
status: "succeeded",
},
],
},
results: [
{
@@ -39,7 +49,7 @@ test("formatSearchOutput shows answer and fallback provider metadata", () => {
} as any);
assert.match(output, /Answer: pi is a coding agent/);
assert.match(output, /Fallback: tavily-main -> exa-fallback/);
assert.match(output, /Fallback: firecrawl-main -> exa-fallback/);
});
test("truncateText shortens long fetch bodies with an ellipsis", () => {
@@ -78,7 +88,17 @@ test("formatFetchOutput shows fallback metadata and favicon/images when present"
providerName: "exa-fallback",
execution: {
actualProviderName: "exa-fallback",
failoverFromProviderName: "tavily-main",
attempts: [
{
providerName: "tavily-main",
status: "failed",
reason: "503 upstream unavailable",
},
{
providerName: "exa-fallback",
status: "succeeded",
},
],
},
results: [
{