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
fix(provider): reword insecure endpoint error and update test
Steven Enamakeld75563660145
diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rsindex b3f2cb0c5b..3237007c91 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs@@ -189,9 +189,8 @@ impl OpenHumanBackendModel {let endpoint = self.base_url()?;if !is_managed_endpoint_for_api_key(&endpoint) {anyhow::bail!(- "refusing to send the TinyHumans API key as a bearer over a non-HTTPS, \- non-loopback endpoint: {endpoint} — set a https:// api_url or a loopback \- one for local testing"+ "refusing to send the TinyHumans API key to an unmanaged or insecure \+ endpoint: {endpoint} — use the managed backend or loopback for local testing");}log::debug!(diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rsindex 4de4d864d1..a0cd0dac9a 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs@@ -482,20 +482,20 @@ fn resolve_bearer_refuses_a_stored_api_key_over_plaintext_non_loopback() {let msg = err.to_string();assert!(msg.contains("refusing to send")- && msg.contains("non-HTTPS")+ && msg.contains("unmanaged or insecure")&& msg.contains("api.example.test"),"error must name the refusal and the offending endpoint: {msg}");}#[test]-fn resolve_bearer_sends_a_stored_api_key_over_https() {+fn resolve_bearer_sends_a_stored_api_key_to_managed_https() {let tmp = tempfile::TempDir::new().unwrap();- let backend = backend_with_api_key("https://api.example.test", tmp.path());+ let backend = backend_with_api_key("https://api.tinyhumans.ai", tmp.path());let token = backend.resolve_bearer()- .expect("https must be allowed to carry the api-key bearer");+ .expect("managed HTTPS must be allowed to carry the api-key bearer");assert_eq!(token, "th_test_key");}