Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(inference): serialize readiness test with provider override

Steven Enamakela3df43f92f16
diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rs
index abb1100545..e63383d2e0 100644
--- a/crates/openhuman-core/src/core/observability.rs
+++ b/crates/openhuman-core/src/core/observability.rs
@@ -989,8 +989,8 @@ pub fn is_session_expired_message(msg: &str) -> bool {
&& msg.contains("\"error\":\"Invalid token\""))
// TAURI-RUST-N — same OpenHuman backend "Invalid token" envelope
// wrapped by the tinyagents `ProviderError::Display` format
- // (`TinyAgentsError::Provider(Box<ProviderError>)`). The crate-native
- // Historical `OpenHumanBackendModel` delegated to `OpenAiModel`
+ // (`TinyAgentsError::Provider(Box<ProviderError>)`). The historical
+ // `OpenHumanBackendModel` delegated to `OpenAiModel`
// which formats errors as `"{provider} returned HTTP {status}: {body}"`,
// producing `"OpenHuman returned HTTP 401: ..."` — different from the
// `"OpenHuman API error (401"` prefix the classic `api_error` path emits.
diff --git a/crates/openhuman-core/src/inference/readiness_tests.rs b/crates/openhuman-core/src/inference/readiness_tests.rs
index 185fe4d522..3372f5ce95 100644
--- a/crates/openhuman-core/src/inference/readiness_tests.rs
+++ b/crates/openhuman-core/src/inference/readiness_tests.rs
@@ -9,6 +9,8 @@ async fn cached_probe_serves_definitive_negative_results() {
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
+ let _model_override_guard =
+ crate::inference::provider::factory::test_provider_override::exclusive();
let tmp = TempDir::new().unwrap();
let mut config = Config {
workspace_dir: tmp.path().join("workspace"),