The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed src/embed/agent.rs
Steven Enamakele7c3f6a74e44
diff --git a/src/embed/agent.rs b/src/embed/agent.rsindex ebba746483..703364f2bc 100644--- a/src/embed/agent.rs+++ b/src/embed/agent.rs@@ -292,6 +292,17 @@ impl Turn<'_> {self.request.cwd.is_some(),);+ // Never transmit the bearer over a non-TLS channel. The route accepts+ // an arbitrary base URL, so guard here — before any request is built —+ // rather than trusting every embedder to only name https endpoints.+ if let Some(endpoint) = self.request.inference_url.as_deref() {+ if has_api_key && !is_https_endpoint(endpoint) {+ return Err(crate::embed::error::CoreError::InsecureRoute {+ endpoint: sanitize_url_for_display(endpoint),+ });+ }+ }+let dispatch = call::<_, String>(self.rt, AGENT_CHAT, &self.request);let reply = match (self.origin, self.progress) {