tinyhumansai/openhuman · error
failed to build Brave HTTP client: {e}
Error message
failed to build Brave HTTP client: {e} What it means
Building the reqwest HTTP client for the Brave Search tools failed inside the `http_client` helper. The client is constructed from the shared TLS builder with a timeout, so this fires when the TLS backend cannot initialize (native TLS library issues on the host) or client builder configuration is rejected. It is an environment/infrastructure failure, not a search-query problem.
Source
Thrown at src/openhuman/search/tools/brave.rs:32
//!
//! Each tool short-circuits with a clear "not configured" error when no
//! key is wired up so the agent surfaces the misconfiguration instead
//! of silently routing elsewhere.
use crate::openhuman::tools::traits::{Tool, ToolCallOptions, ToolResult};
use async_trait::async_trait;
use serde::Deserialize;
use serde_json::{json, Value};
use std::time::Duration;
const DEFAULT_API_BASE: &str = "https://api.search.brave.com/res/v1";
fn http_client(timeout_secs: u64) -> anyhow::Result<reqwest::Client> {
crate::openhuman::util::tls::tls_client_builder()
.timeout(Duration::from_secs(timeout_secs.max(1)))
.connect_timeout(Duration::from_secs(10))
.build()
.map_err(|e| anyhow::anyhow!("failed to build Brave HTTP client: {e}"))
}
#[derive(Debug, Clone)]
struct BraveConfig {
api_key: Option<String>,
max_results: usize,
timeout_secs: u64,
}
impl BraveConfig {
fn require_key(&self) -> anyhow::Result<&str> {
self.api_key
.as_deref()
.map(str::trim)
.filter(|s| !s.is_empty())
.ok_or_else(|| {
anyhow::anyhow!(
"Brave Search unavailable: no API key configured. \View on GitHub (pinned to 7491200858)
Solutions
- Verify the platform TLS libraries are installed and healthy (e.g. up-to-date ca-certificates on Linux)
- Retry after ruling out transient system resource exhaustion (file descriptor limits can block client creation)
- If it persists, capture the chained inner error — it distinguishes TLS init failure from builder misconfiguration
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/search/tools/brave.rs:32 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/94f2a108d536ee32.
Report an issue: GitHub.