Skip to content

fix: whitespace-only env vars bypass web backend detection + clearer Firecrawl error#2341

Merged
teknium1 merged 2 commits intomainfrom
hermes/hermes-40b195db
Mar 21, 2026
Merged

fix: whitespace-only env vars bypass web backend detection + clearer Firecrawl error#2341
teknium1 merged 2 commits intomainfrom
hermes/hermes-40b195db

Conversation

@teknium1
Copy link
Contributor

Salvage of PR #1763 by @JackTheGit (198 commits behind, cherry-picked cleanly).

Two fixes:

  1. Whitespace-only env vars (FIRECRAWL_API_KEY=" ") were treated as valid config, causing incorrect backend selection. Added _has_env() helper that strips whitespace.
  2. Firecrawl error message now clearly tells users to set FIRECRAWL_API_KEY (cloud) or FIRECRAWL_API_URL (self-hosted), with a logger.error call for gateway logs.

1 file, +14/-9. 56 web tool tests pass. Authorship preserved.

@teknium1 teknium1 merged commit 3835a8d into main Mar 21, 2026
1 check 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.

2 participants