Skip to content

feat(search): always include Alexandria in authenticated firecrawl_search - #549

Merged
nickscamara merged 2 commits into
mainfrom
capy/always-include-alexandria-in
Oct 17, 2026
Merged

nickscamara merged 2 commits into
mainfrom
capy/always-include-alexandria-in

Conversation

@nickscamara

@nickscamara nickscamara commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Authenticated firecrawl_search now always asks for Alexandria provider matches, including when the caller passes sources that leave it out.

Behaviour

Request Sent sources (authenticated) Keyless / no credential
sources omitted or [] ["web", "alexandria"] (unchanged) ["web"] (unchanged)
["web"] ["web", "alexandria"] ["web"]
["news"], ["web", "images"] requested sources + "alexandria" requested sources
[{ type: "web" }] [{ type: "web" }, { type: "alexandria" }] (form preserved, since the API rejects mixed arrays) requested sources
["alexandria"] alone unchanged key-required error (unchanged)
  • alexandria is never duplicated; exchange still normalizes to alexandria.
  • enterprise: ["zdr"] or ["anon"] does not get Alexandria added, because the API refuses provider discovery for those modes.
  • domainTools keeps defaulting to true when Alexandria is combined with web, news or images; an explicit domainTools: false is respected.
  • When the API refuses discovery the caller did not ask for (for example a team with forced zero data retention), the search retries once on the caller's requested sources instead of always ["web"]. postSearchWithFallback takes the fallback sources as an optional fourth argument, so existing callers keep working.
  • The same logic applies to the search-surface copy in src/service/search-surface.ts.

Billing is unchanged: the API counts only web, news, image and index results toward search credits, and provider discovery is free. A live check returned the same creditsUsed for ["web"] with and without Alexandria.

Copy

Search descriptions, the sources parameter and the server instructions replace the sources: ["web"] opt-out sentence with the always-on behaviour. The scrape description no longer says "with sources unset". The description stays within the 2,048-character cap.

Tests

  • New cases cover web, news, mixed, object-form, explicit Alexandria, gov and developer categories, ZDR and anon, a credential-less session, and the fallback to requested sources.
  • Contract snapshots regenerated; version bumped to 3.30.3 with a changelog entry.

Open in Capy


Summary by cubic

Authenticated firecrawl_search now always asks for Alexandria provider matches, even when the caller passes sources that leave it out.

  • sources arrays without Alexandria get it appended, preserving string or object form; omitted or empty sources still default to ["web", "alexandria"].
  • ["alexandria"] alone, keyless or credential-less sessions, and enterprise: ["zdr"] or ["anon"] searches are unchanged.
  • When the API refuses the added discovery, the search retries on the caller's requested sources instead of always ["web"]; postSearchWithFallback takes the fallback sources as an optional fourth argument.
  • Tool and server copy now describes the always-on behavior, including that zdr and anon searches do not add it.
  • Billing is unchanged; provider discovery is free and creditsUsed matches a ["web"]-only request.

Written for commit 5c40110. Summary will update on new commits.

View guided diff Turn on auto-fix

…arch

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 21 files

Requires human review: Authenticated searches now always append Alexandria to caller-supplied sources, overriding explicit web-only requests, with fallback retry and copy changes. This alters the public sources contract, so a human should decide on the product/behavior tradeoff.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/alexandria.ts
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 10 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Authenticated firecrawl_search now always appends Alexandria to caller-provided sources, changing the public tool contract and domainTools defaults; dismissed P3 copy issue about zdr/anon exceptions remains.

View guided diff | Turn on auto-fix | Re-trigger cubic

@nickscamara
nickscamara merged commit 26a23f2 into main Oct 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant