feat: Add providers.brave.apiKeyFile for web_search support #21

Open
opened 2026-02-15 17:04:32 -05:00 by yindo · 0 comments
Owner

Originally created by @jack-work on GitHub (Feb 1, 2026).

Summary

Moltbot's web_search tool requires a Brave Search API key. Currently there's no native Nix option to inject this secret, requiring users to manually set the BRAVE_API_KEY environment variable.

Proposal

Add providers.brave.apiKeyFile option (following the existing providers.anthropic.apiKeyFile pattern) that:

  • Reads the API key from a file at runtime
  • Exports it as BRAVE_API_KEY in the gateway wrapper script
  • Enables web_search without manual env configuration

Example usage

programs.moltbot.instances.default = {
  providers.brave.apiKeyFile = "/path/to/secrets/brave-api-key";
};

Related

Originally created by @jack-work on GitHub (Feb 1, 2026). ## Summary Moltbot's `web_search` tool requires a Brave Search API key. Currently there's no native Nix option to inject this secret, requiring users to manually set the `BRAVE_API_KEY` environment variable. ## Proposal Add `providers.brave.apiKeyFile` option (following the existing `providers.anthropic.apiKeyFile` pattern) that: - Reads the API key from a file at runtime - Exports it as `BRAVE_API_KEY` in the gateway wrapper script - Enables `web_search` without manual env configuration ## Example usage ```nix programs.moltbot.instances.default = { providers.brave.apiKeyFile = "/path/to/secrets/brave-api-key"; }; ``` ## Related - Brave Search API docs: https://brave.com/search/api/ - Moltbot web_search docs: https://docs.molt.bot/tools/web
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#21